Beispiel #1
0
 def test_best_rational_approximation_raise(self, v):
     with pytest.raises(NoApproximationError,
                        match="Couldn't find approximation."):
         best_rational_approximation(v)
Beispiel #2
0
 def test_best_rational_approximation(self, v, n, d):
     assert best_rational_approximation(v) == {"n": n, "d": d}