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

Method test_legacy_paths

Lib/test/test_compileall.py:640–648  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

638 locals()['test_pep3147_paths_' + name] = f
639
640 def test_legacy_paths(self):
641 # Ensure that with the proper switch, compileall leaves legacy
642 # pyc files, and no __pycache__ directory.
643 self.assertRunOK('-b', '-q', self.pkgdir)
644 # Verify the __pycache__ directory contents.
645 self.assertFalse(os.path.exists(self.pkgdir_cachedir))
646 expected = sorted(['__init__.py', '__init__.pyc', 'bar.py',
647 'bar.pyc'])
648 self.assertEqual(sorted(os.listdir(self.pkgdir)), expected)
649
650 def test_multiple_runs(self):
651 # Bug 8527 reported that multiple calls produced empty

Callers

nothing calls this directly

Calls 5

assertRunOKMethod · 0.95
assertFalseMethod · 0.80
listdirMethod · 0.80
existsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected