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

Method test_symlink_loop

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

Source from the content-addressed store, hash-verified

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