MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_trailing_slash

Method test_trailing_slash

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

Source from the content-addressed store, hash-verified

1448
1449 # Regression test for http://bugs.python.org/issue1293.
1450 def test_trailing_slash(self):
1451 with open(os.path.join(self.path, 'test_trailing_slash.py'),
1452 'w', encoding='utf-8') as f:
1453 f.write("testdata = 'test_trailing_slash'")
1454 sys.path.append(self.path+'/')
1455 mod = __import__("test_trailing_slash")
1456 self.assertEqual(mod.testdata, 'test_trailing_slash')
1457 unload("test_trailing_slash")
1458
1459 # Regression test for http://bugs.python.org/issue3677.
1460 @unittest.skipUnless(sys.platform == 'win32', 'Windows-specific')

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected