tests: Simplify QuitPythonProcess.
This commit is contained in:
parent
28258be599
commit
e944239ae8
@ -77,20 +77,10 @@ class PythonProcess(testprocess.Process):
|
||||
return []
|
||||
|
||||
|
||||
class QuitPythonProcess(testprocess.Process):
|
||||
class QuitPythonProcess(PythonProcess):
|
||||
|
||||
"""A testprocess which quits immediately."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.proc.setReadChannel(QProcess.StandardOutput)
|
||||
|
||||
def _parse_line(self, line):
|
||||
print("LINE: {}".format(line))
|
||||
if line.strip() == 'ready':
|
||||
self.ready.emit()
|
||||
return testprocess.Line(line)
|
||||
|
||||
def _executable_args(self):
|
||||
code = [
|
||||
'import sys',
|
||||
@ -99,9 +89,6 @@ class QuitPythonProcess(testprocess.Process):
|
||||
]
|
||||
return (sys.executable, ['-c', ';'.join(code)])
|
||||
|
||||
def _default_args(self):
|
||||
return []
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def pyproc():
|
||||
|
Loading…
Reference in New Issue
Block a user