Message376904
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/test_interpreter.py", line 87, in test_datetime_linspace
self.assertAlmostEqual(time_list[-1], now, 6)
File "/usr/lib/python3.8/unittest/case.py", line 957, in assertAlmostEqual
if round(diff, places) == 0:
TypeError: type datetime.timedelta doesn't define __round__ method
Despite the definition
@overload
def assertAlmostEqual(self, first: datetime.datetime, second: datetime.datetime,
places: int = ..., msg: Any = ...,
delta: datetime.timedelta = ...) -> None: ...
on file case.pyi, the case.py 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:09 | hildogjr | set | recipients:
+ hildogjr |
2020-09-14 20:57:09 | hildogjr | set | messageid: <1600117029.56.0.0494687927822.issue41785@roundup.psfhosted.org> |
2020-09-14 20:57:09 | hildogjr | link | issue41785 messages |
2020-09-14 20:57:09 | hildogjr | create | |
|