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:
|
||||
self.assertEqual(payload.read(), 'some payload\n')
|
||||
|
||||
|
||||
def test_010_run_service(self):
|
||||
self.listen_and_send(b'0\0')
|
||||
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'],
|
||||
stdout=subprocess.PIPE)
|
||||
self.vol.import_data(input_proc.stdout)
|
||||
input_proc.stdout.close()
|
||||
self.assertAllCalled()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user