X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fdiscover_tests.py;h=fbd2d9c7e59b77f64b93410c8893231a9d5f0408;hb=5ecbbc128999813fcb6ee9025541b01ae87b824a;hp=eea594107b67449eb43f36a69f81bc949fadaf80;hpb=e0d2bd6bd7fc59c0c6ac48195d7f825dc99bfd91;p=vpp.git diff --git a/test/discover_tests.py b/test/discover_tests.py index eea594107b6..fbd2d9c7e59 100755 --- a/test/discover_tests.py +++ b/test/discover_tests.py @@ -22,15 +22,13 @@ def discover_tests(directory, callback): if not _f.startswith("test_") or not _f.endswith(".py"): continue name = "".join(f.split("/")[-1].split(".")[:-1]) - if name in sys.modules: - raise Exception("Duplicate test module `%s' found!" % name) module = importlib.import_module(name) for name, cls in module.__dict__.items(): if not isinstance(cls, type): continue if not issubclass(cls, unittest.TestCase): continue - if name == "VppTestCase": + if name == "VppTestCase" or name.startswith("Template"): continue for method in dir(cls): if not callable(getattr(cls, method)):