Skip to content

Commit

Permalink
feat: support testsuite in testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
Ming5024 committed May 4, 2023
1 parent 77a9795 commit 8c27b11
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions testbase/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,15 @@ def _load_from_testsuite(
ignore_testsuite=True,
)
else:
tests += self._load_from_class(
test, data_key, exclude_data_key=exclude_data_key, attrs=attrs
)
if issubclass(test, TestSuite):
testcases = self._load_from_testsuite(

Check warning on line 321 in testbase/loader.py

View check run for this annotation

Codecov / codecov/patch

testbase/loader.py#L321

Added line #L321 was not covered by tests
test, data_key, exclude_data_key=exclude_data_key, attrs=attrs
)
tests += [test(testcases)]

Check warning on line 324 in testbase/loader.py

View check run for this annotation

Codecov / codecov/patch

testbase/loader.py#L324

Added line #L324 was not covered by tests
else:
tests += self._load_from_class(
test, data_key, exclude_data_key=exclude_data_key, attrs=attrs
)

return [it for it in tests if not cls.filter(it)]

Expand Down

0 comments on commit 8c27b11

Please sign in to comment.