These are 38x faster. They also helped me find and fix a bug in the exporter
Signed-off-by: Zack Cerza <zack@redhat.com>
+import importlib
import pytest
+import sys
from pathlib import Path
-from subprocess import check_call
from typing import List
root = Path("./teuthology")
@pytest.mark.parametrize("module", find_modules())
def test_import_modules(module):
- check_call(["python3", "-c", f"import {module}"])
+ importlib.import_module(module)
+ assert module in sys.modules