@@ -89,17 +89,17 @@ def add_mypy_package(self, name: str, packagename: str, *flags: str) -> None:
89
89
def add_mypy_string (self , name : str , * args : str , cwd : Optional [str ] = None ) -> None :
90
90
self .add_mypy_cmd (name , ['-c' ] + list (args ), cwd = cwd )
91
91
92
- def add_pytest (self , name : str , pytest_files : List [str ], coverage : bool = True ) -> None :
93
- pytest_args = pytest_files + self .arglist + self .pyt_arglist
94
- full_name = 'pytest %s' % name
95
- if not self .allow (full_name ):
92
+ def add_pytest (self , pytest_files : List [str ], coverage : bool = True ) -> None :
93
+ pytest_files = [name for name in pytest_files if self .allow (name [4 :])]
94
+ if not pytest_files :
96
95
return
96
+ pytest_args = pytest_files + self .arglist + self .pyt_arglist
97
97
if coverage and self .coverage :
98
98
args = [sys .executable , '-m' , 'pytest' , '--cov=mypy' ] + pytest_args
99
99
else :
100
100
args = [sys .executable , '-m' , 'pytest' ] + pytest_args
101
101
102
- self .waiter .add (LazySubprocess (full_name , args , env = self .env , passthrough = self .verbosity ),
102
+ self .waiter .add (LazySubprocess ('pytest' , args , env = self .env , passthrough = self .verbosity ),
103
103
sequential = True )
104
104
105
105
def add_python (self , name : str , * args : str , cwd : Optional [str ] = None ) -> None :
@@ -212,12 +212,12 @@ def test_path(*names: str):
212
212
'testparse' ,
213
213
'testsemanal' ,
214
214
'testpythoneval' ,
215
- 'testcmdline'
215
+ 'testcmdline' ,
216
+ 'teststubgen'
216
217
)
217
218
218
219
MYUNIT_FILES = test_path (
219
- 'teststubgen' , # contains data-driven suite
220
-
220
+ 'teststubgen' ,
221
221
'testargs' ,
222
222
'testgraph' ,
223
223
'testinfer' ,
@@ -233,7 +233,7 @@ def test_path(*names: str):
233
233
234
234
235
235
def add_pytest (driver : Driver ) -> None :
236
- driver .add_pytest ('pytest' , PYTEST_FILES )
236
+ driver .add_pytest (PYTEST_FILES )
237
237
238
238
239
239
def add_myunit (driver : Driver ) -> None :
0 commit comments