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

Class LinalgCase

numpy/linalg/tests/test_linalg.py:76–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75
76class LinalgCase:
77 def __init__(self, name, a, b, tags=set()):
78 """
79 A bundle of arguments to be passed to a test case, with an identifying
80 name, the operands a and b, and a set of tags to filter the tests
81 """
82 assert_(isinstance(name, str))
83 self.name = name
84 self.a = a
85 self.b = b
86 self.tags = frozenset(tags) # prevent shared tags
87
88 def check(self, do):
89 """
90 Run the function `do` on this test case, expanding arguments
91 """
92 do(self.a, self.b, tags=self.tags)
93
94 def __repr__(self):
95 return f'<LinalgCase: {self.name}>'
96
97
98def apply_tag(tag, cases):

Callers 4

test_linalg.pyFile · 0.85
_make_generalized_casesFunction · 0.85
_make_strided_casesFunction · 0.85

Calls

no outgoing calls

Tested by 2

_make_generalized_casesFunction · 0.68
_make_strided_casesFunction · 0.68