(self)
| 41 | assert_raises(ValueError, matrix, "invalid") |
| 42 | |
| 43 | def test_bmat_nondefault_str(self): |
| 44 | A = np.array([[1, 2], [3, 4]]) |
| 45 | B = np.array([[5, 6], [7, 8]]) |
| 46 | Aresult = np.array([[1, 2, 1, 2], |
| 47 | [3, 4, 3, 4], |
| 48 | [1, 2, 1, 2], |
| 49 | [3, 4, 3, 4]]) |
| 50 | mixresult = np.array([[1, 2, 5, 6], |
| 51 | [3, 4, 7, 8], |
| 52 | [5, 6, 1, 2], |
| 53 | [7, 8, 3, 4]]) |
| 54 | assert_(np.all(bmat("A,A;A,A") == Aresult)) |
| 55 | assert_(np.all(bmat("A,A;A,A", ldict={'A': B}) == Aresult)) |
| 56 | assert_raises(TypeError, bmat, "A,A;A,A", gdict={'A': B}) |
| 57 | assert_( |
| 58 | np.all(bmat("A,A;A,A", ldict={'A': A}, gdict={'A': B}) == Aresult)) |
| 59 | b2 = bmat("A,B;C,D", ldict={'A': A, 'B': B}, gdict={'C': B, 'D': A}) |
| 60 | assert_(np.all(b2 == mixresult)) |
| 61 | |
| 62 | |
| 63 | class TestProperties: |
nothing calls this directly
no test coverage detected