Skip to content

Commit

Permalink
Add test for bug
Browse files Browse the repository at this point in the history
  • Loading branch information
terrorfisch committed Apr 17, 2020
1 parent c7d932d commit 65bfa89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/utils/time_type_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def test_fraction_time_from_float_exact_fallback(self):
def assert_fraction_time_from_float_with_precision_works(self, time_type):
self.assertEqual(time_type.from_float(1000000 / 1000001, 1e-5),
fractions.Fraction(1))
self.assertEqual(time_type.from_float(2.50000000000008, absolute_error=1e-10),
time_type.from_fraction(5, 2))

def test_fraction_time_from_float_with_precision(self):
self.assert_fraction_time_from_float_with_precision_works(qutypes.TimeType)
Expand Down

0 comments on commit 65bfa89

Please sign in to comment.