Commit 2f632a3e authored by Kirill Smelkov's avatar Kirill Smelkov

os/signal: tests: Adjust exit code expectation for Windows

On windows upon terminating signal reception exict code of the process
is always 3 instead of -signo. And so test_signal_all was failing as

        def test_signal_all():
            retcode, out, _ = _pyrun([dir_testprog + "/signal_test_all.py"], stdout=PIPE)
            assert b"ok (notify)"        in out
            assert b"ok (ignore)"        in out
            assert b"terminating ..."    in out
    >       assert retcode == -syscall.SIGTERM.signo
    E       assert 3 == -15
    E        +  where 15 = os.Signal(15).signo
    E        +    where os.Signal(15) = syscall.SIGTERM
parent c1d5b67b
...@@ -203,7 +203,7 @@ def test_signal_all(): ...@@ -203,7 +203,7 @@ def test_signal_all():
assert b"ok (notify)" in out assert b"ok (notify)" in out
assert b"ok (ignore)" in out assert b"ok (ignore)" in out
assert b"terminating ..." in out assert b"terminating ..." in out
assert retcode == -syscall.SIGTERM.signo assert retcode == (-syscall.SIGTERM.signo if os.name != 'nt' else 3)
# test_stdlib_interop verifies that there is minimal compatibility in between # test_stdlib_interop verifies that there is minimal compatibility in between
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment