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

Method test_recursion_limit

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

Source from the content-addressed store, hash-verified

689 self.assertCompiled(hamfn)
690
691 def test_recursion_limit(self):
692 subpackage = os.path.join(self.pkgdir, 'spam')
693 subpackage2 = os.path.join(subpackage, 'ham')
694 subpackage3 = os.path.join(subpackage2, 'eggs')
695 for pkg in (subpackage, subpackage2, subpackage3):
696 script_helper.make_pkg(pkg)
697
698 subinitfn = os.path.join(subpackage, '__init__.py')
699 hamfn = script_helper.make_script(subpackage, 'ham', '')
700 spamfn = script_helper.make_script(subpackage2, 'spam', '')
701 eggfn = script_helper.make_script(subpackage3, 'egg', '')
702
703 self.assertRunOK('-q', '-r 0', self.pkgdir)
704 self.assertNotCompiled(subinitfn)
705 self.assertFalse(
706 os.path.exists(os.path.join(subpackage, '__pycache__')))
707
708 self.assertRunOK('-q', '-r 1', self.pkgdir)
709 self.assertCompiled(subinitfn)
710 self.assertCompiled(hamfn)
711 self.assertNotCompiled(spamfn)
712
713 self.assertRunOK('-q', '-r 2', self.pkgdir)
714 self.assertCompiled(subinitfn)
715 self.assertCompiled(hamfn)
716 self.assertCompiled(spamfn)
717 self.assertNotCompiled(eggfn)
718
719 self.assertRunOK('-q', '-r 5', self.pkgdir)
720 self.assertCompiled(subinitfn)
721 self.assertCompiled(hamfn)
722 self.assertCompiled(spamfn)
723 self.assertCompiled(eggfn)
724
725 @os_helper.skip_unless_symlink
726 def test_symlink_loop(self):

Callers

nothing calls this directly

Calls 8

assertRunOKMethod · 0.95
assertNotCompiledMethod · 0.95
assertCompiledMethod · 0.95
assertFalseMethod · 0.80
joinMethod · 0.45
make_pkgMethod · 0.45
make_scriptMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected