[issue41785] Unittest do not support datatime for AlmostEqual method

2020-09-14 Thread Hildo Guillardi Júnior
Hildo Guillardi Júnior added the comment: Thanks. -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue41785] Unittest do not support datatime for AlmostEqual method

2020-09-14 Thread Irit Katriel
Irit Katriel added the comment: You need to pass the delta in as a kwarg: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual >>> unittest.TestCase().assertAlmostEqual( datetime.date(2020,1,5), >>> datetime.date(2020,1,2), delta=datetime.timedelta(2)) Traceba

[issue41785] Unittest do not support datatime for AlmostEqual method

2020-09-14 Thread Hildo Guillardi Júnior
New submission from Hildo Guillardi Júnior : 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. --