Commits

Matthew Schinckel committed 535436a

Doctest fixes

Comments (0)

Files changed (2)

timedelta/helpers.py

         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)

timedelta/tests.py

         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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.