diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2021-04-15 13:34:37 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2021-04-15 13:34:37 -0500 |
| commit | bd067ba87b458f440a59d1c4668840dcb9e9a789 (patch) | |
| tree | 7182daa5ea473594e7c5fb73de2075d2afcf424c /tests/test_default_connection.py | |
| parent | Add napoleon extension settings (diff) | |
| download | lirc-bd067ba87b458f440a59d1c4668840dcb9e9a789.zip | |
Fix send_once issue where signal is sent twice
Diffstat (limited to 'tests/test_default_connection.py')
| -rw-r--r-- | tests/test_default_connection.py | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/tests/test_default_connection.py b/tests/test_default_connection.py index bc4fa09..8488dd3 100644 --- a/tests/test_default_connection.py +++ b/tests/test_default_connection.py @@ -1,29 +1,32 @@ -from unittest.mock import patch import socket +from unittest.mock import patch + +import pytest from lirc.connection.default_connection import DefaultConnection from lirc.exceptions import UnsupportedOperatingSystemError -import pytest - -@pytest.mark.parametrize("os, expected_socket, expected_address", [ - ( - "Windows", - socket.socket(socket.AF_INET, socket.SOCK_STREAM), - ("localhost", 8765) - ), - ( - "Linux", - socket.socket(socket.AF_UNIX, socket.SOCK_STREAM), - "/var/run/lirc/lircd" - ), - ( - "Darwin", - socket.socket(socket.AF_UNIX, socket.SOCK_STREAM), - "/opt/run/var/run/lirc/lircd" - ) -]) +@pytest.mark.parametrize( + "os, expected_socket, expected_address", + [ + ( + "Windows", + socket.socket(socket.AF_INET, socket.SOCK_STREAM), + ("localhost", 8765), + ), + ( + "Linux", + socket.socket(socket.AF_UNIX, socket.SOCK_STREAM), + "/var/run/lirc/lircd", + ), + ( + "Darwin", + socket.socket(socket.AF_UNIX, socket.SOCK_STREAM), + "/opt/run/var/run/lirc/lircd", + ), + ], +) @patch("platform.system") def test_default_connection_has_correct_os_specific_socket_and_address( patched_system, os, expected_socket, expected_address |