Skip to content

Commit

Permalink
use pytest to obtain loaded tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Sep 11, 2024
1 parent 78999ec commit aaad8b8
Show file tree
Hide file tree
Showing 3 changed files with 32,509 additions and 26 deletions.
19 changes: 19 additions & 0 deletions romanisim/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import pytest

ALL_TEST_NAMES = set()


def pytest_collection_modifyitems(config, items):
for item in items:
if not hasattr(item, "module"):
# for doctests just use name (since it contains the module)
name = item.name
else:
# otherwise add module
name = ".".join((item.module.__name__, item.name))
ALL_TEST_NAMES.add(name)


@pytest.fixture
def all_test_names():
return ALL_TEST_NAMES
Loading

0 comments on commit aaad8b8

Please sign in to comment.