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

Method setUp

Lib/test/test_reprlib.py:659–674  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

657 longname = 'areallylongpackageandmodulenametotestreprtruncation'
658
659 def setUp(self):
660 self.pkgname = os.path.join(self.longname)
661 self.subpkgname = os.path.join(self.longname, self.longname)
662 # Make the package and subpackage
663 shutil.rmtree(self.pkgname, ignore_errors=True)
664 os.mkdir(self.pkgname)
665 create_empty_file(os.path.join(self.pkgname, '__init__.py'))
666 shutil.rmtree(self.subpkgname, ignore_errors=True)
667 os.mkdir(self.subpkgname)
668 create_empty_file(os.path.join(self.subpkgname, '__init__.py'))
669 # Remember where we are
670 self.here = os.getcwd()
671 sys.path.insert(0, self.here)
672 # When regrtest is run with its -j option, this command alone is not
673 # enough.
674 importlib.invalidate_caches()
675
676 def tearDown(self):
677 actions = []

Callers

nothing calls this directly

Calls 5

create_empty_fileFunction · 0.90
joinMethod · 0.45
mkdirMethod · 0.45
insertMethod · 0.45
invalidate_cachesMethod · 0.45

Tested by

no test coverage detected