Skip to content

Commit 5f5f55e

Browse files
committed
CR: pass -j, -q, -v to pytest
1 parent ba2c9f1 commit 5f5f55e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

mypy/waiter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ def __init__(self, name: str, args: List[str], *, cwd: str = None,
3737
self.passthrough = passthrough
3838

3939
def start(self) -> None:
40-
if self.passthrough is None:
40+
if self.passthrough is None or self.passthrough < 0:
4141
self.outfile = tempfile.TemporaryFile()
4242
else:
4343
if self.passthrough >= 0:
4444
self.outfile = None
45-
else:
46-
self.outfile = DEVNULL
4745
self.start_time = time.perf_counter()
4846
self.process = Popen(self.args, cwd=self.cwd, env=self.env,
4947
stdout=self.outfile, stderr=STDOUT)

runtests.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,13 @@ def main() -> None:
422422
pyt_arglist.append('--lf')
423423
if ff:
424424
pyt_arglist.append('--ff')
425+
if verbosity >= 1:
426+
pyt_arglist.extend(['-v'] * verbosity)
427+
elif verbosity < 0:
428+
pyt_arglist.extend(['-q'] * (-verbosity))
429+
if parallel_limit:
430+
if '-n' not in pyt_arglist:
431+
pyt_arglist.append('-n{}'.format(parallel_limit))
425432

426433
driver = Driver(whitelist=whitelist, blacklist=blacklist, lf=lf, ff=ff,
427434
arglist=arglist, pyt_arglist=pyt_arglist, verbosity=verbosity,

0 commit comments

Comments
 (0)