From 1dc5daa4d8f95b2fd212037fd21fa379b4eb41fe Mon Sep 17 00:00:00 2001 From: hannut91 Date: Sat, 29 Jun 2019 14:25:49 +0900 Subject: [PATCH] Fix TestWithTempDir test to pass on Mac Fix TestWithTmpeDir test that comapre os.getcwd() and tmpdir. os.getcwd() returns the result of resolving the symbolic link. But tmpdir absolute path. Testing fails on Mac because the /tmp directory is a symbolic link. Comparing the results of resolving tempdir will pass the test. But RustPython does not implement lstat, so it does not pass, but in CPython The test passes. --- tests/snippets/stdlib_os.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/snippets/stdlib_os.py b/tests/snippets/stdlib_os.py index ef9b9111d..d2e39c1ce 100644 --- a/tests/snippets/stdlib_os.py +++ b/tests/snippets/stdlib_os.py @@ -244,7 +244,7 @@ with TestWithTempDir() as tmpdir: with TestWithTempCurrentDir(): os.chdir(tmpdir) - assert os.getcwd() == tmpdir + assert os.getcwd() == os.path.realpath(tmpdir) os.path.exists(FILE_NAME) # supports