(self)
| 483 | poly.set_default_printstyle('ascii') |
| 484 | |
| 485 | def test_str(self): |
| 486 | p = poly.Polynomial([1/2, 1/7, 1/7*10**8, 1/7*10**9]) |
| 487 | assert_equal(str(p), '0.5 + 0.14285714 x + 14285714.28571429 x**2 ' |
| 488 | '+ (1.42857143e+08) x**3') |
| 489 | |
| 490 | with printoptions(precision=3): |
| 491 | assert_equal(str(p), '0.5 + 0.143 x + 14285714.286 x**2 ' |
| 492 | '+ (1.429e+08) x**3') |
| 493 | |
| 494 | def test_latex(self): |
| 495 | p = poly.Polynomial([1/2, 1/7, 1/7*10**8, 1/7*10**9]) |
nothing calls this directly
no test coverage detected