tests: fix file descriptor leak

This commit is contained in:
Marek Marczykowski-Górecki 2017-05-25 16:10:12 +02:00
parent c435de06a1
commit 9cdf9a0e60
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 1 additions and 1 deletions

View File

@ -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:

View File

@ -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()