Skip to content

Commit 94f1e53

Browse files
authored
5.0: Remove extra_tests arg for DiscoverRunner.build_suite/run_tests (#1978)
* Remove extra_tests arg for DiscoverRunner.build_suite/run_tests * Fix test_labels
1 parent c57ef3f commit 94f1e53

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

django-stubs/test/runner.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ class DiscoverRunner:
144144
@contextmanager
145145
def load_with_patterns(self) -> Iterator[None]: ...
146146
def load_tests_for_label(self, label: str, discover_kwargs: dict[str, str]) -> TestSuite: ...
147-
def build_suite(
148-
self, test_labels: Sequence[str] = ..., extra_tests: list[Any] | None = ..., **kwargs: Any
149-
) -> TestSuite: ...
147+
def build_suite(self, test_labels: Sequence[str] | None = ..., **kwargs: Any) -> TestSuite: ...
150148
def setup_databases(self, **kwargs: Any) -> list[tuple[BaseDatabaseWrapper, str, bool]]: ...
151149
def get_resultclass(self) -> type[TextTestResult] | None: ...
152150
def get_test_runner_kwargs(self) -> dict[str, Any]: ...
@@ -157,7 +155,7 @@ class DiscoverRunner:
157155
def suite_result(self, suite: TestSuite, result: TextTestResult, **kwargs: Any) -> int: ...
158156
def _get_databases(self, suite: TestSuite) -> set[str]: ...
159157
def get_databases(self, suite: TestSuite) -> set[str]: ...
160-
def run_tests(self, test_labels: list[str], extra_tests: list[Any] | None = ..., **kwargs: Any) -> int: ...
158+
def run_tests(self, test_labels: list[str], **kwargs: Any) -> int: ...
161159

162160
def is_discoverable(label: str) -> bool: ...
163161
def reorder_suite(

scripts/stubtest/allowlist_todo.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,6 @@ django.templatetags.static.StaticNode.__init__
16691669
django.test.SimpleTestCase.assertFormError
16701670
django.test.SimpleTestCase.assertFormSetError
16711671
django.test.SimpleTestCase.assertTemplateNotUsed
1672-
django.test.runner.DiscoverRunner.build_suite
16731672
django.test.runner.DiscoverRunner.log
16741673
django.test.runner.DiscoverRunner.reorder_by
16751674
django.test.runner.DummyList

scripts/stubtest/allowlist_todo_django50.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ django.test.client.AsyncClient.post
246246
django.test.client.AsyncClient.put
247247
django.test.client.AsyncClient.trace
248248
django.test.runner.DiscoverRunner.__init__
249-
django.test.runner.DiscoverRunner.run_tests
250249
django.test.runner.RemoteTestResult.addDuration
251250
django.utils.baseconv
252251
django.utils.choices

0 commit comments

Comments
 (0)