Author hildogjr
Recipients hildogjr
Date 2020-09-14.20:57:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I am running a test

`self.assertAlmostEqual(date1, date2, 6)`

and getting the result:

ERROR: test_datetime_linspace (__main__.TestFunctions)
Check the linspace object output type and delta between them.
Traceback (most recent call last):
  File "/home/lab/Documents/UNICAMP/LabREI/web-visualization/tests/", line 87, in test_datetime_linspace
    self.assertAlmostEqual(time_list[-1], now, 6)
  File "/usr/lib/python3.8/unittest/", line 957, in assertAlmostEqual
    if round(diff, places) == 0:
TypeError: type datetime.timedelta doesn't define __round__ method

Despite the definition

    def assertAlmostEqual(self, first: datetime.datetime, second: datetime.datetime,
                          places: int = ..., msg: Any = ...,
                          delta: datetime.timedelta = ...) -> None: ...

on file case.pyi, the doesn't deal good with `if round(diff, places) == 0:`, with `diff` the difference between the two varaibles.
Date User Action Args
2020-09-14 20:57:09hildogjrsetrecipients: + hildogjr
2020-09-14 20:57:09hildogjrsetmessageid: <>
2020-09-14 20:57:09hildogjrlinkissue41785 messages
2020-09-14 20:57:09hildogjrcreate