Tidy getting of timeout from kwargs

This commit is contained in:
Kyle Altendorf 2018-10-04 23:15:30 -04:00
parent 900cef6397
commit dd225e1b9d
1 changed files with 1 additions and 6 deletions

View File

@ -1163,12 +1163,7 @@ class Testdir(object):
args = ("-p", plugins[0]) + args
args = self._getpytestargs() + args
if "timeout" in kwargs:
timeout = {"timeout": kwargs["timeout"]}
else:
timeout = {}
return self.run(*args, **timeout)
return self.run(*args, timeout=kwargs.get("timeout"))
def spawn_pytest(self, string, expect_timeout=10.0):
"""Run pytest using pexpect.