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

Method test_symlink_loop

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

Source from the content-addressed store, hash-verified

724
725 @os_helper.skip_unless_symlink
726 def test_symlink_loop(self):
727 # Currently, compileall ignores symlinks to directories.
728 # If that limitation is ever lifted, it should protect against
729 # recursion in symlink loops.
730 pkg = os.path.join(self.pkgdir, 'spam')
731 script_helper.make_pkg(pkg)
732 os.symlink('.', os.path.join(pkg, 'evil'))
733 os.symlink('.', os.path.join(pkg, 'evil2'))
734 self.assertRunOK('-q', self.pkgdir)
735 self.assertCompiled(os.path.join(
736 self.pkgdir, 'spam', 'evil', 'evil2', '__init__.py'
737 ))
738
739 def test_quiet(self):
740 noisy = self.assertRunOK(self.pkgdir)

Callers

nothing calls this directly

Calls 4

assertRunOKMethod · 0.95
assertCompiledMethod · 0.95
joinMethod · 0.45
make_pkgMethod · 0.45

Tested by

no test coverage detected