tests: fix file descriptor leak
This commit is contained in:
parent
c435de06a1
commit
9cdf9a0e60
@ -323,7 +323,6 @@ class TC_20_QubesLocal(unittest.TestCase):
|
|||||||
with open(tmpdir + '/payload') as payload:
|
with open(tmpdir + '/payload') as payload:
|
||||||
self.assertEqual(payload.read(), 'some payload\n')
|
self.assertEqual(payload.read(), 'some payload\n')
|
||||||
|
|
||||||
|
|
||||||
def test_010_run_service(self):
|
def test_010_run_service(self):
|
||||||
self.listen_and_send(b'0\0')
|
self.listen_and_send(b'0\0')
|
||||||
with mock.patch('subprocess.Popen') as mock_proc:
|
with mock.patch('subprocess.Popen') as mock_proc:
|
||||||
|
@ -158,6 +158,7 @@ class TestVMVolume(qubesadmin.tests.QubesTestCase):
|
|||||||
input_proc = subprocess.Popen(['echo', '-n', 'some-data'],
|
input_proc = subprocess.Popen(['echo', '-n', 'some-data'],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
self.vol.import_data(input_proc.stdout)
|
self.vol.import_data(input_proc.stdout)
|
||||||
|
input_proc.stdout.close()
|
||||||
self.assertAllCalled()
|
self.assertAllCalled()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user