1. Matthew Schinckel
  2. django-timedelta-field

Commits

Matthew Schinckel  committed 535436a

Doctest fixes

  • Participants
  • Parent commits 87b6c56
  • Branches default

Comments (0)

Files changed (2)

File timedelta/helpers.py

View file
         return sec1 / sec2
     else:
         if as_float:
-            assert None, "float=True is inappropriate when dividing timedelta by a number."
+            assert None, "as_float=True is inappropriate when dividing timedelta by a number."
         secs = sec1 / obj2
         if isinstance(secs, Decimal):
             secs = float(secs)

File timedelta/tests.py

View file
         4
         >>> divide(datetime.timedelta(2), datetime.timedelta(3))
         0
-        >>> divide(datetime.timedelta(8), datetime.timedelta(3), float=True)
+        >>> divide(datetime.timedelta(8), datetime.timedelta(3), as_float=True)
         2.6666666666666665
         >>> divide(datetime.timedelta(8), 2.0)
         datetime.timedelta(4)
-        >>> divide(datetime.timedelta(8), 2, float=True)
+        >>> divide(datetime.timedelta(8), 2, as_float=True)
         Traceback (most recent call last):
             ...
-        AssertionError: float=True is inappropriate when dividing timedelta by a number.
+        AssertionError: as_float=True is inappropriate when dividing timedelta by a number.
         """
     
     def percentage(self):