diff options
author | Patrick N <pnpnpn@users.noreply.github.com> | 2020-11-14 19:50:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 19:50:55 -0500 |
commit | 9fbc3ef5b6f8f8cba2eb7ba795813d6ec543e265 (patch) | |
tree | d8cfd4a4c4da8d083162cbb46a887607fe3adc57 /tests | |
parent | 3c4bad7f66e1109ccdcb79c2cb62cd669b7666d8 (diff) | |
download | timeout-decorator-9fbc3ef5b6f8f8cba2eb7ba795813d6ec543e265.tar.gz |
Roidelapluie functionkwargs (#65)upstream-master
* Allow to use timeout in function kwargs even when initial seconds is None
Initial support for timeout in function kwargs was implemented by 187ee34d9e0a571bcc7f9233208462634940f4c0
* drop support for 2.6, 3.4, 3.5 and add support for 3.7, 3.8, 3.9
* drop support for 2.6, 3.4, 3.5 and add support for 3.7, 3.8, 3.9
* WIP trying to fix bild
* WIP trying to fix bild
* fix build
* bump version to 0.5.0
* bump version to 0.5.0
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Patrick N <patricng>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_timeout_decorator.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_timeout_decorator.py b/tests/test_timeout_decorator.py index fad4d81..2c2d9c7 100644 --- a/tests/test_timeout_decorator.py +++ b/tests/test_timeout_decorator.py @@ -45,6 +45,14 @@ def test_timeout_alternate_exception(use_signals): f(timeout=1) +def test_timeout_kwargs_with_initial_timeout_none(use_signals): + @timeout(use_signals=use_signals) + def f(): + time.sleep(2) + with pytest.raises(TimeoutError): + f(timeout=1) + + def test_timeout_no_seconds(use_signals): @timeout(use_signals=use_signals) def f(): |