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

Class CustomImporter

library/python/pytest/plugins/ya.py:81–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79
80
81class CustomImporter(object):
82 def __init__(self, roots):
83 self._roots = roots
84
85 def find_spec(self, fullname, path, target=None):
86 return None
87
88 def find_module(self, fullname, package_path=None):
89 for path in self._roots:
90 full_path = self._get_module_path(path, fullname)
91
92 if os.path.exists(full_path) and os.path.isdir(full_path) and not os.path.exists(os.path.join(full_path, "__init__.py")):
93 open(os.path.join(full_path, "__init__.py"), "w").close()
94
95 return None
96
97 def _get_module_path(self, path, fullname):
98 return os.path.join(path, *fullname.split('.'))
99
100
101class YaTestLoggingFileHandler(logging.FileHandler):

Callers 1

pytest_configureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected