diff options
-rw-r--r-- | Lib/test/test_platform.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 5024737db9..2fa13096ee 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -17,12 +17,13 @@ class PlatformTest(unittest.TestCase): 'import platform; print platform.architecture()'] p = subprocess.Popen(cmd, stdout=subprocess.PIPE) return p.communicate() - symlink = os.path.abspath(test_support.TESTFN) - os.symlink(sys.executable, symlink) + real = os.path.realpath(sys.executable) + link = os.path.abspath(test_support.TESTFN) + os.symlink(real, link) try: - self.assertEqual(get(sys.executable), get(symlink)) + self.assertEqual(get(real), get(link)) finally: - os.remove(symlink) + os.remove(link) def test_machine(self): res = platform.machine() |