[Checkins] SVN: zope.configuration/trunk/src/zope/configuration/tests/test_name.py Fix for windows compatibility (hopefully)
Partick Gerken
cvs-admin at zope.org
Tue May 22 20:51:32 UTC 2012
Log message for revision 126448:
Fix for windows compatibility (hopefully)
This test failed under windows.
The code to be tested failed with the following
comparison:
os.path.normpath('/absolute') == os.path.abspath('/absolute')
even when one tries to reproduce the failure unter
linux with ntpath, the failure does not appear.
Under windows, the drive letter must be part
of the absolute path, in this is what abspath
but not normpath does.
Changed:
U zope.configuration/trunk/src/zope/configuration/tests/test_name.py
-=-
Modified: zope.configuration/trunk/src/zope/configuration/tests/test_name.py
===================================================================
--- zope.configuration/trunk/src/zope/configuration/tests/test_name.py 2012-05-22 20:04:44 UTC (rev 126447)
+++ zope.configuration/trunk/src/zope/configuration/tests/test_name.py 2012-05-22 20:51:29 UTC (rev 126448)
@@ -108,8 +108,9 @@
def test_absolute(self):
import os
- self.assertEqual(self._callFUT('/absolute'),
- os.path.normpath('/absolute'))
+ absolute_path = os.path.abspath('/absolute')
+ self.assertEqual(self._callFUT(absolute_path),
+ os.path.normpath(absolute_path))
def test_relative_bogus_package(self):
self.assertRaises(ImportError,
More information about the checkins
mailing list