Skip to content

Commit

Permalink
Tests: Compatibility with Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed May 8, 2024
1 parent 930cc51 commit 7bd8c38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import imp
import shlex
import sys
import threading
Expand Down Expand Up @@ -50,6 +49,7 @@ def mqttshark():
assert 'DISCONNECT' in out


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="Does not work on Python 3.12")
def test_cli_load_module(capsys):
"""
Basic test function, loading `mqttshark` as Python module.
Expand All @@ -58,6 +58,8 @@ def test_cli_load_module(capsys):
:param capsys:
:return:
"""
import imp

command = "mqttshark --version"
sys.argv[1:] = shlex.split(command)
with pytest.raises(SystemExit):
Expand Down

0 comments on commit 7bd8c38

Please sign in to comment.