module_finder_test: mask one more difference between unit2 vs. direct start

pull/595/head
David Wilson 6 years ago
parent 5eb10aacef
commit 2f68a5a660

@ -120,7 +120,13 @@ class SysModulesMethodTest(testlib.TestCase):
import __main__
path, src, is_pkg = self.call('__main__')
self.assertEquals(path, __main__.__file__)
self.assertEquals(src, open(path, 'rb').read())
# linecache adds a line ending to the final line if one is missing.
actual_src = open(path, 'rb').read()
if actual_src[-1] != '\n':
actual_src += '\n'
self.assertEquals(src, actual_src)
self.assertFalse(is_pkg)
def test_dylib_fails(self):

Loading…
Cancel
Save