Message9756

Author jeff.allen
Recipients jeff.allen
Date 2015-04-05.17:13:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1428254010.74.0.607123294039.issue2307@psf.upfronthosting.co.za>
In-reply-to
Content
On Windows at least, there is come mis-handling of the normalisation of file paths. This shows as a test failure in test_chdir, but seems not to be related to actually changing directory. We are perhaps not handling paths in the same way as CPython.

Typical test_chdir output:

======================================================================
FAIL: test_chdir (__main__.ChdirTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeff\Documents\Eclipse\jython-trunk\dist\Lib\test\test_chdir.py", line 155, in test_chdir
    self.assertEqual(os.path.realpath(self.dir1), cwd)
AssertionError: 'c:\\users\\jeff\\appdata\\local\\temp\\tmpxsjrue' != 'C:\\Users\\Jeff\\AppData\\Local\\Temp\\tmpxsjrue'

======================================================================
FAIL: test_relative_chdir (__main__.ChdirTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeff\Documents\Eclipse\jython-trunk\dist\Lib\test\test_chdir.py", line 162, in test_relative_chdir
    self.assertEqual(os.getcwd(), os.path.realpath(self.dir1))
AssertionError: 'C:\\Users\\Jeff\\AppData\\Local\\Temp\\tmp1laq83' != 'c:\\users\\jeff\\appdata\\local\\temp\\tmp1laq83'

======================================================================
FAIL: test_realpath (__main__.FilesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeff\Documents\Eclipse\jython-trunk\dist\Lib\test\test_chdir.py", line 585, in test_realpath
    self.assertEqual(os.path.realpath(self.filename1),
AssertionError: 'c:\\users\\jeff\\appdata\\local\\temp\\tmpgxmxi1\\tmputfwjw' != 'C:\\Users\\Jeff\\AppData\\Local\\Temp\\tmpgxmxi1\\tmputfwjw'

======================================================================
FAIL: test_windows_chdir_dos_path (__main__.WindowsChdirTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeff\Documents\Eclipse\jython-trunk\dist\Lib\test\test_chdir.py", line 194, in test_windows_chdir_dos_path
    self.assertEqual(os.getcwd(), os.path.realpath(dos_name))
AssertionError: 'C:\\Users\\Jeff\\AppData\\Local\\Temp\\tmpyok90j\\Program Files' != 'c:\\users\\jeff\\appdata\\local\\temp\\tmpyok90j\\progra~1'

======================================================================
FAIL: test_windows_chdir_slash_isabs (__main__.WindowsChdirTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeff\Documents\Eclipse\jython-trunk\dist\Lib\test\test_chdir.py", line 233, in test_windows_chdir_slash_isabs
    self.assertEqual(os.path.normcase(os.getcwd()),
AssertionError: 'c:\\users\\jeff\\documents\\eclipse\\jython-trunk' != 'c:\\'

======================================================================
FAIL: test_windows_getcwd_ensures_drive_letter (__main__.WindowsChdirTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeff\Documents\Eclipse\jython-trunk\dist\Lib\test\test_chdir.py", line 204, in test_windows_getcwd_ensures_drive_letter
    self.assertEqual(os.path.normcase(os.getcwd()),
AssertionError: 'c:\\users\\jeff\\documents\\eclipse\\jython-trunk' != 'c:\\'
History
Date User Action Args
2015-04-05 17:13:30jeff.allensetrecipients: + jeff.allen
2015-04-05 17:13:30jeff.allensetmessageid: <1428254010.74.0.607123294039.issue2307@psf.upfronthosting.co.za>
2015-04-05 17:13:30jeff.allenlinkissue2307 messages
2015-04-05 17:13:30jeff.allencreate