MCPcopy Create free account
hub / github.com/catboost/catboost / remove_user_site

Function remove_user_site

library/python/pytest/main.py:90–104  ·  view source on GitHub ↗
(paths)

Source from the content-addressed store, hash-verified

88 ]
89
90 def remove_user_site(paths):
91 site_paths = ('site-packages', 'site-python')
92
93 def is_site_path(path):
94 for p in site_paths:
95 if path.find(p) != -1:
96 return True
97 return False
98
99 new_paths = list(paths)
100 for p in paths:
101 if is_site_path(p):
102 new_paths.remove(p)
103
104 return new_paths
105
106 sys.path = remove_user_site(sys.path)
107 rc = pytest.main(

Callers 1

mainFunction · 0.85

Calls 3

is_site_pathFunction · 0.85
listClass · 0.50
removeMethod · 0.45

Tested by

no test coverage detected