Test casting for a single value.
(self)
| 30 | |
| 31 | class TestAsPairs: |
| 32 | def test_single_value(self): |
| 33 | """Test casting for a single value.""" |
| 34 | expected = np.array([[3, 3]] * 10) |
| 35 | for x in (3, [3], [[3]]): |
| 36 | result = _as_pairs(x, 10) |
| 37 | assert_equal(result, expected) |
| 38 | # Test with dtype=object |
| 39 | obj = object() |
| 40 | assert_equal( |
| 41 | _as_pairs(obj, 10), |
| 42 | np.array([[obj, obj]] * 10) |
| 43 | ) |
| 44 | |
| 45 | def test_two_values(self): |
| 46 | """Test proper casting for two different values.""" |
nothing calls this directly
no test coverage detected