diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c972300..603c3e9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] env: OS: ${{ matrix.os }} diff --git a/tests/test_cli.py b/tests/test_cli.py index 757b586..86850b9 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,3 @@ -import imp import shlex import sys import threading @@ -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. @@ -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):