Skip to content

Commit 3bc8278

Browse files
authored
Fix paramters for ParallelTestSuite and RemoteTestRunner. (#1072)
* Fix paramters for ParallelTestSuite and RemoteTestRunner. A new parameter `buffer` is added. `suites` is renamed to `subsuites`. ParallelTestSuite: https://github.com/django/django/blob/2fac0a18081dcc77fc860c801e5d727dc90435b3/django/test/runner.py#L468-L475 RemoteTestRunner: https://github.com/django/django/blob/2fac0a18081dcc77fc860c801e5d727dc90435b3/django/test/runner.py#L350 `buffer` was added in django/django@f6713cd, `suites` was renamed in django/django@cb6c197. Both of these changes were made in 4.1rc1. Signed-off-by: Zixuan James Li <[email protected]> * Adjust types of attributes for runners. Signed-off-by: Zixuan James Li <[email protected]> Signed-off-by: Zixuan James Li <[email protected]>
1 parent 6f9afd3 commit 3bc8278

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

django-stubs/test/runner.pyi

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ class RemoteTestResult:
6565

6666
class RemoteTestRunner:
6767
resultclass: Any = ...
68-
failfast: Any = ...
69-
def __init__(self, failfast: bool = ..., resultclass: Optional[Any] = ...) -> None: ...
68+
failfast: bool = ...
69+
buffer: bool = ...
70+
def __init__(self, failfast: bool = ..., resultclass: Optional[Any] = ..., buffer: bool = ...) -> None: ...
7071
def run(self, test: Any): ...
7172

7273
def default_test_processes() -> int: ...
@@ -75,10 +76,15 @@ class ParallelTestSuite(TestSuite):
7576
init_worker: Any = ...
7677
run_subsuite: Any = ...
7778
runner_class: Any = ...
78-
subsuites: Any = ...
79-
processes: Any = ...
80-
failfast: Any = ...
81-
def __init__(self, suite: Any, processes: Any, failfast: bool = ...) -> None: ...
79+
subsuites: List[TestSuite] = ...
80+
processes: int = ...
81+
failfast: bool = ...
82+
buffer: bool = ...
83+
initial_settings: Any = ...
84+
serialized_contents: Any = ...
85+
def __init__(
86+
self, subsuites: List[TestSuite], processes: int, failfast: bool = ..., buffer: bool = ...
87+
) -> None: ...
8288
def run(self, result: Any): ... # type: ignore[override]
8389

8490
class DiscoverRunner:

0 commit comments

Comments
 (0)