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

Method f

Lib/test/test_compileall.py:627–637  ·  view source on GitHub ↗
(self, ext=ext, switch=switch)

Source from the content-addressed store, hash-verified

625 ('doubleoptimize', 'opt-2.pyc', ['-OO']),
626 ]:
627 def f(self, ext=ext, switch=switch):
628 script_helper.assert_python_ok(*(switch +
629 ['-m', 'compileall', '-q', self.pkgdir]))
630 # Verify the __pycache__ directory contents.
631 self.assertTrue(os.path.exists(self.pkgdir_cachedir))
632 expected = sorted(base.format(sys.implementation.cache_tag, ext)
633 for base in ('__init__.{}.{}', 'bar.{}.{}'))
634 self.assertEqual(sorted(os.listdir(self.pkgdir_cachedir)), expected)
635 # Make sure there are no .pyc files in the source directory.
636 self.assertFalse([fn for fn in os.listdir(self.pkgdir)
637 if fn.endswith(ext)])
638 locals()['test_pep3147_paths_' + name] = f
639
640 def test_legacy_paths(self):

Callers

nothing calls this directly

Calls 8

assert_python_okMethod · 0.80
assertTrueMethod · 0.80
listdirMethod · 0.80
assertFalseMethod · 0.80
existsMethod · 0.45
formatMethod · 0.45
assertEqualMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected