Skip to content

Commit 7bd8c38

Browse files
committed
Tests: Compatibility with Python 3.12
1 parent 930cc51 commit 7bd8c38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import imp
21
import shlex
32
import sys
43
import threading
@@ -50,6 +49,7 @@ def mqttshark():
5049
assert 'DISCONNECT' in out
5150

5251

52+
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="Does not work on Python 3.12")
5353
def test_cli_load_module(capsys):
5454
"""
5555
Basic test function, loading `mqttshark` as Python module.
@@ -58,6 +58,8 @@ def test_cli_load_module(capsys):
5858
:param capsys:
5959
:return:
6060
"""
61+
import imp
62+
6163
command = "mqttshark --version"
6264
sys.argv[1:] = shlex.split(command)
6365
with pytest.raises(SystemExit):

0 commit comments

Comments
 (0)