tests: make tests not fail with substituted sys.stdout
At best lets skip tests in such a case.
This commit is contained in:
parent
09acf4729b
commit
206f1a7c5b
@ -22,12 +22,18 @@ import io
|
||||
import unittest.mock
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import qubesmgmt.tests
|
||||
import qubesmgmt.tools.qvm_run
|
||||
|
||||
|
||||
class TC_00_qvm_run(qubesmgmt.tests.QubesTestCase):
|
||||
def setUp(self):
|
||||
if sys.stdout is not sys.__stdout__ or \
|
||||
sys.stderr is not sys.__stderr__:
|
||||
self.skipTest('qvm-run change behavior on redirected stdout/stderr')
|
||||
super(TC_00_qvm_run, self).setUp()
|
||||
def test_000_run_single(self):
|
||||
self.app.expected_calls[
|
||||
('dom0', 'mgmt.vm.List', None, None)] = \
|
||||
|
@ -48,7 +48,7 @@ class TC_00_qvm_start_gui(qubesmgmt.tests.QubesTestCase):
|
||||
b'KWIN_RUNNING = 0x1\n',
|
||||
b'access control enabled, only authorized clients can connect\n'
|
||||
b'SI:localuser:root\n'
|
||||
b'SI:localuser:' + os.getlogin().encode() + b'\n',
|
||||
b'SI:localuser:' + os.environ['USER'].encode() + b'\n',
|
||||
]
|
||||
|
||||
args = self.launcher.kde_guid_args(self.app.domains['test-vm'])
|
||||
|
Loading…
Reference in New Issue
Block a user