(self)
| 468 | pytest.raises(RuntimeError, lambda: (x * x).linear_solve(x)) |
| 469 | |
| 470 | def test_as_numer_denom(self): |
| 471 | x = as_symbol("x") |
| 472 | y = as_symbol("y") |
| 473 | n = as_number(123) |
| 474 | |
| 475 | assert as_numer_denom(x) == (x, as_number(1)) |
| 476 | assert as_numer_denom(x / n) == (x, n) |
| 477 | assert as_numer_denom(n / x) == (n, x) |
| 478 | assert as_numer_denom(x / y) == (x, y) |
| 479 | assert as_numer_denom(x * y) == (x * y, as_number(1)) |
| 480 | assert as_numer_denom(n + x / y) == (x + n * y, y) |
| 481 | assert as_numer_denom(n + x / (y - x / n)) == (y * n**2, y * n - x) |
| 482 | |
| 483 | def test_polynomial_atoms(self): |
| 484 | x = as_symbol("x") |
nothing calls this directly
no test coverage detected