def test_valid_loglevel_cli_argument(): with pytest.raises(ReactorAlreadyRunning): main(['-l', 'INFO'])
def test_main(): with pytest.raises(SystemExit): main(['-h', '-l debug'])
def test_invalid_loglevel_cli_argument(): with pytest.raises(ValueError): main(['-l', 'dog'])