diff --git a/test/test_query.py b/test/test_query.py index 897ed58..c471c38 100644 --- a/test/test_query.py +++ b/test/test_query.py @@ -23,6 +23,15 @@ class Tests(unittest.TestCase): + """Test querying tools from several modules. + + Note: + + Tests that run setup script directly fail due to conflict between distutils used internally + by setuptools and distutils used internally by pip. For more information, see: + - https://github.com/pypa/setuptools/issues/3297 + - https://github.com/pypa/pip/issues/8761 + """ def _check_examples_count(self, description, examples): lvl = logging.WARNING if len(examples) < 10 else logging.INFO @@ -87,6 +96,7 @@ def test_query_pkg_info(self): @unittest.skipUnless( os.environ.get('TEST_PACKAGING') or os.environ.get('CI'), 'skipping packaging test') + @unittest.skipIf(sys.version_info < (3, 12), 'requires Python 3.12+') def test_query_pkg_info_current(self): with preserve_logger_level('version_query'): run_module('setup', 'build') @@ -120,6 +130,7 @@ def test_query_package_folder(self): @unittest.skipUnless( os.environ.get('TEST_PACKAGING') or os.environ.get('CI'), 'skipping packaging test') + @unittest.skipIf(sys.version_info < (3, 12), 'requires Python 3.12+') def test_query_package_folder_current(self): with preserve_logger_level('version_query'): run_module('setup', 'build')