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

Method should_skip

mypy/test/testfinegrained.py:59–73  ·  view source on GitHub ↗
(self, testcase: DataDrivenTestCase)

Source from the content-addressed store, hash-verified

57 use_cache = False
58
59 def should_skip(self, testcase: DataDrivenTestCase) -> bool:
60 # Decide whether to skip the test. This could have been structured
61 # as a filter() classmethod also, but we want the tests reported
62 # as skipped, not just elided.
63 if self.use_cache:
64 if testcase.only_when == "-only_when_nocache":
65 return True
66 # TODO: In caching mode we currently don't well support
67 # starting from cached states with errors in them.
68 if testcase.output and testcase.output[0] != "==":
69 return True
70 else:
71 if testcase.only_when == "-only_when_cache":
72 return True
73 return False
74
75 def run_case(self, testcase: DataDrivenTestCase) -> None:
76 if self.should_skip(testcase):

Callers 1

run_caseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected