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

Method pth_file_tests

Lib/test/test_site.py:113–118  ·  view source on GitHub ↗

Contain common code for testing results of reading a .pth file

(self, pth_file)

Source from the content-addressed store, hash-verified

111 "by _init_pathinfo(): %s" % (entry, dir_set))
112
113 def pth_file_tests(self, pth_file):
114 """Contain common code for testing results of reading a .pth file"""
115 self.assertIn(pth_file.imported, sys.modules,
116 "%s not in sys.modules" % pth_file.imported)
117 self.assertIn(site.makepath(pth_file.good_dir_path)[0], sys.path)
118 self.assertFalse(os.path.exists(pth_file.bad_dir_path))
119
120 def test_addpackage(self):
121 # Make sure addpackage() imports if the line starts with 'import',

Callers 2

test_addpackageMethod · 0.95
test_addsitedirMethod · 0.95

Calls 3

assertInMethod · 0.80
assertFalseMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected