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

Method setUpClass

Lib/idlelib/idle_test/test_config.py:184–198  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

182
183 @classmethod
184 def setUpClass(cls):
185 cls.config_string = {}
186
187 conf = config.IdleConf(_utest=True)
188 if __name__ != '__main__':
189 idle_dir = os.path.dirname(__file__)
190 else:
191 idle_dir = os.path.abspath(sys.path[0])
192 for ctype in conf.config_types:
193 config_path = os.path.join(idle_dir, '../config-%s.def' % ctype)
194 with open(config_path) as f:
195 cls.config_string[ctype] = f.read()
196
197 cls.orig_warn = config._warn
198 config._warn = Func()
199
200 @classmethod
201 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 6

FuncClass · 0.90
openFunction · 0.50
dirnameMethod · 0.45
abspathMethod · 0.45
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected