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

Method _do_test

numpy/core/tests/test_scalar_ctors.py:94–101  ·  view source on GitHub ↗
(self, t1, t2)

Source from the content-addressed store, hash-verified

92 """ gh-15467 """
93
94 def _do_test(self, t1, t2):
95 x = t1(2)
96 arr = np.array(x, dtype=t2)
97 # type should be preserved exactly
98 if t2 is None:
99 assert arr.dtype.type is t1
100 else:
101 assert arr.dtype.type is t2
102
103 @pytest.mark.parametrize('t1', int_types + uint_types)
104 @pytest.mark.parametrize('t2', int_types + uint_types + [None])

Callers 3

test_integersMethod · 0.95
test_realsMethod · 0.95
test_complexMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected