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

Method test_addsitedir

Lib/test/test_site.py:189–200  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

187 self.assertNotIn("abc\x00def", path)
188
189 def test_addsitedir(self):
190 # Same tests for test_addpackage since addsitedir() essentially just
191 # calls addpackage() for every .pth file in the directory
192 pth_file = PthFile()
193 pth_file.cleanup(prep=True) # Make sure that nothing is pre-existing
194 # that is tested for
195 try:
196 pth_file.create()
197 site.addsitedir(pth_file.base_dir, set())
198 self.pth_file_tests(pth_file)
199 finally:
200 pth_file.cleanup()
201
202 def test_addsitedir_dotfile(self):
203 pth_file = PthFile('.dotfile')

Callers

nothing calls this directly

Calls 5

cleanupMethod · 0.95
createMethod · 0.95
pth_file_testsMethod · 0.95
PthFileClass · 0.85
setFunction · 0.85

Tested by

no test coverage detected