MCPcopy Index your code
hub / github.com/python/mypy / run_case

Method run_case

mypyc/test/test_run.py:168–177  ·  view source on GitHub ↗
(self, testcase: DataDrivenTestCase)

Source from the content-addressed store, hash-verified

166 strict_dunder_typing = False
167
168 def run_case(self, testcase: DataDrivenTestCase) -> None:
169 with pytest.MonkeyPatch.context() as mp:
170 mp.delenv("CFLAGS", raising=False)
171 # setup.py wants to be run from the root directory of the package, which we accommodate
172 # by chdiring into tmp/
173 with (
174 use_custom_builtins(os.path.join(self.data_prefix, ICODE_GEN_BUILTINS), testcase),
175 chdir_manager("tmp"),
176 ):
177 self.run_case_inner(testcase)
178
179 def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
180 if not os.path.isdir(WORKDIR): # (one test puts something in build...)

Callers

nothing calls this directly

Calls 4

run_case_innerMethod · 0.95
use_custom_builtinsFunction · 0.90
chdir_managerFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected