diff --git a/setup.cfg b/setup.cfg index 91dd713c..3827c72d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -59,7 +59,7 @@ test = pylint pytest pytest-cov - scspell3k>=2.2 + scspell3k>=2.2; python_version < "3.13" [options.packages.find] exclude = diff --git a/test/test_spell_check.py b/test/test_spell_check.py index 10e5725d..8ab0de48 100644 --- a/test/test_spell_check.py +++ b/test/test_spell_check.py @@ -2,6 +2,7 @@ # Licensed under the Apache License, Version 2.0 from pathlib import Path +import sys import pytest @@ -16,9 +17,14 @@ def known_words(): @pytest.mark.linter def test_spell_check(known_words): - from scspell import Report - from scspell import SCSPELL_BUILTIN_DICT - from scspell import spell_check + try: + from scspell import Report + from scspell import SCSPELL_BUILTIN_DICT + from scspell import spell_check + except ModuleNotFoundError: + if sys.version_info >= (3, 13): + pytest.skip('scspell3k is not available for Python 3.13+') + raise source_filenames = [ Path(__file__).parents[1] / 'bin' / 'colcon',