pnpnpn / timeout-decorator

Timeout decorator for Python
MIT License
628 stars 94 forks source link

test_timeout_kwargs_with_initial_timeout_none #69

Open jayvdb opened 3 years ago

jayvdb commented 3 years ago

I am packaging timeout-decorator for openSUSE, and found that the two test_timeout_kwargs_with_initial_timeout_none tests are both failing.

[  112s] =================================== FAILURES ===================================
[  112s] _____________ test_timeout_kwargs_with_initial_timeout_none[False] _____________
[  112s] 
[  112s] use_signals = False
[  112s] 
[  112s]     def test_timeout_kwargs_with_initial_timeout_none(use_signals):
[  112s]         @timeout(use_signals=use_signals)
[  112s]         def f():
[  112s]             time.sleep(2)
[  112s]         with pytest.raises(TimeoutError):
[  112s] >           f(timeout=1)
[  112s] E           TypeError: f() got an unexpected keyword argument 'timeout'
[  112s] 
[  112s] test_timeout_decorator.py:53: TypeError
[  112s] _____________ test_timeout_kwargs_with_initial_timeout_none[True] ______________
[  112s] 
[  112s] use_signals = True
[  112s] 
[  112s]     def test_timeout_kwargs_with_initial_timeout_none(use_signals):
[  112s]         @timeout(use_signals=use_signals)
[  112s]         def f():
[  112s]             time.sleep(2)
[  112s]         with pytest.raises(TimeoutError):
[  112s] >           f(timeout=1)
[  112s] E           TypeError: f() got an unexpected keyword argument 'timeout'
[  112s] 
[  112s] test_timeout_decorator.py:53: TypeError
[  112s] =========================== short test summary info ============================
[  112s] FAILED test_timeout_decorator.py::test_timeout_kwargs_with_initial_timeout_none[False]
[  112s] FAILED test_timeout_decorator.py::test_timeout_kwargs_with_initial_timeout_none[True]

packaging project at https://build.opensuse.org/package/show/home:jayvdb:py-submit/python-timeout-decorator

dirkmueller commented 1 year ago

This appears to be fixed in the 0.5.0 release that got uploaded to pypi (although there is no corresponding git tag in this repository here)