• Kirill Smelkov's avatar
    os/signal: tests: Use SIGTERM/SIGINT on Windows · 75d40910
    Kirill Smelkov authored
    We use SIGUSR1/SIGUSR2 mainly in this test, but those signals are not
    available on Windows:
    
            @func
            def test_signal():
                # Notify/Stop with wrong chan dtype -> panic
                _ = panics("pychan: channel type mismatch")
        >       with _:  signal.Notify(chan(2), syscall.SIGUSR1)
        E       AttributeError: module 'golang.syscall' has no attribute 'SIGUSR1'
    
    -> Use SIGTERM/SIGINT if SIGUSR1/SIGUSR2 are not available.
    
    Don't want to use SIGTERM/SIGINT unconditionally because those signals are
    better to leave for the job control so that e.g. nxdtest can properly kill
    spawned pygolang tests.
    75d40910
signal_test.py 11.5 KB