MCPcopy Create free account
hub / github.com/numpy/numpy / check_cases

Method check_cases

numpy/linalg/tests/test_linalg.py:344–361  ·  view source on GitHub ↗

Run func on each of the cases with all of the tags in require, and none of the tags in exclude

(self, require=set(), exclude=set())

Source from the content-addressed store, hash-verified

342 TEST_CASES = CASES
343
344 def check_cases(self, require=set(), exclude=set()):
345 """
346 Run func on each of the cases with all of the tags in require, and none
347 of the tags in exclude
348 """
349 for case in self.TEST_CASES:
350 # filter by require and exclude
351 if case.tags & require != require:
352 continue
353 if case.tags & exclude:
354 continue
355
356 try:
357 case.check(self.do)
358 except Exception as e:
359 msg = f'In test case: {case!r}\n\n'
360 msg += traceback.format_exc()
361 raise AssertionError(msg) from e
362
363
364class LinalgSquareTestCase(LinalgTestCase):

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected