MCPcopy Index your code
hub / github.com/python/cpython / test_trailing_slash

Method test_trailing_slash

Lib/test/test_import/__init__.py:1497–1504  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1495
1496 # Regression test for http://bugs.python.org/issue1293.
1497 def test_trailing_slash(self):
1498 with open(os.path.join(self.path, 'test_trailing_slash.py'),
1499 'w', encoding='utf-8') as f:
1500 f.write("testdata = 'test_trailing_slash'")
1501 sys.path.append(self.path+'/')
1502 mod = __import__("test_trailing_slash")
1503 self.assertEqual(mod.testdata, 'test_trailing_slash')
1504 unload("test_trailing_slash")
1505
1506 # Regression test for http://bugs.python.org/issue3677.
1507 @unittest.skipUnless(sys.platform == 'win32', 'Windows-specific')

Callers

nothing calls this directly

Calls 7

unloadFunction · 0.90
__import__Function · 0.85
openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45
appendMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected