Don't use os.normcase when the result we are expecting is None.

This worked fine on linux but fails on Windows.  That may or may
not be a but in normcase.
This commit is contained in:
R. David Murray 2010-06-17 13:23:18 +00:00
parent d35a32e12e
commit 4155f97699
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ class TestRetrievingSourceCode(GetSourceBase):
self.assertEqual(normcase(inspect.getsourcefile(git.abuse)), modfile) self.assertEqual(normcase(inspect.getsourcefile(git.abuse)), modfile)
fn = "_non_existing_filename_used_for_sourcefile_test.py" fn = "_non_existing_filename_used_for_sourcefile_test.py"
co = compile("None", fn, "exec") co = compile("None", fn, "exec")
self.assertEqual(normcase(inspect.getsourcefile(co)), None) self.assertEqual(inspect.getsourcefile(co), None)
linecache.cache[co.co_filename] = (1, None, "None", co.co_filename) linecache.cache[co.co_filename] = (1, None, "None", co.co_filename)
self.assertEqual(normcase(inspect.getsourcefile(co)), fn) self.assertEqual(normcase(inspect.getsourcefile(co)), fn)