Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions micropytest/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def run_tests(
tests_path,
show_estimates=False,
context_class=TestContext,
context_kwargs={},
context_kwargs=None,
test_filter=None,
tag_filter=None,
exclude_tags=None,
Expand Down Expand Up @@ -340,6 +340,8 @@ def run_tests(
:param exclude_tags: (str or list) Optional tag(s) to exclude tests by
:param show_progress: (bool) Whether to show a progress bar during test execution
"""
if context_kwargs is None:
context_kwargs = {}
discover_ctx = context_class(**context_kwargs)
tests = discover_tests(discover_ctx, tests_path, test_filter, tag_filter, exclude_tags)
test_results = run_discovered_tests(
Expand All @@ -360,11 +362,14 @@ def run_discovered_tests(
show_estimates=False,
show_progress=True,
context_class=TestContext,
context_kwargs={},
context_kwargs=None,
dry_run=False,
) -> list[TestResult]:
"""Run the given set of tests that were discovered in a previous step."""

if context_kwargs is None:
context_kwargs = {}

# Logger
root_logger = get_logger()

Expand Down
Loading