timedelta max days must be limited to avoid OverflowError
Closed this issue · 0 comments
cdown commented
(srt2)srt develop % nosetests
................E
======================================================================
ERROR: test_srt.test_timedelta_to_srt_timestamp_can_go_over_24_hours
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/chris/.virtualenvs/srt2/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/chris/.virtualenvs/srt2/lib/python3.5/site-packages/nose/util.py", line 620, in newfunc
return func(*arg, **kw)
File "/home/chris/git/srt/.hypothesis/eval_source/hypothesis_temporary_module_78736ba901963f92a0b55c24ad2f5a433c7031c0.py", line 5, in test_timedelta_to_srt_timestamp_can_go_over_24_hours
return f(days)
File "/home/chris/.virtualenvs/srt2/lib/python3.5/site-packages/hypothesis/core.py", line 577, in wrapped_test
print_example=True
File "/home/chris/.virtualenvs/srt2/lib/python3.5/site-packages/hypothesis/executors/executors.py", line 25, in default_executor
return function()
File "/home/chris/.virtualenvs/srt2/lib/python3.5/site-packages/hypothesis/core.py", line 369, in run
return test(*args, **kwargs)
File "/home/chris/git/srt/tests/test_srt.py", line 67, in test_timedelta_to_srt_timestamp_can_go_over_24_hours
srt_timestamp = srt.timedelta_to_srt_timestamp(timedelta(days=days))
OverflowError: days=1000000000; must have magnitude <= 999999999
-------------------- >> begin captured stdout << ---------------------
Falsifying example: test_timedelta_to_srt_timestamp_can_go_over_24_hours(days=1000000000)
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------