Check that given module names are valid.
# SPDX-License-Identifier: LGPL-3.0-or-later
#
import ast
+import importlib
import itertools
import typing
from logging import Logger
@@ -16,6 +17,7 @@ from ordered_set import OrderedSet
from pynguin.analyses import module
from pynguin.analyses.module import (
+ MODULE_BLACKLIST,
ModuleTestCluster,
TypeInferenceStrategy,
_ParseResult,
@@ -303,6 +305,12 @@ def test_nothing_from_blacklist():
assert cluster.num_accessible_objects_under_test() == 1
+def test_blacklist_is_valid():
+ # Naive test without assert, checks if the module names are valid.
+ for item in MODULE_BLACKLIST:
+ importlib.import_module(item)
+
+
def test_nothing_included_multiple_times():
cluster = generate_test_cluster("tests.fixtures.cluster.diamond_top")
assert sum(len(cl) for cl in cluster.generators.values()) == 5
