tests: Fix running test under Python 3.6

See https://docs.python.org/3/library/subprocess.html#subprocess.run :
Changed in version 3.7: [...] Added the capture_output parameter.

Closes: #33
This commit is contained in:
James 2021-07-07 03:45:34 +00:00 committed by Bastien Nocera
parent 8944e16894
commit 23157c2aa4

View file

@ -264,7 +264,7 @@ class Tests(dbusmock.DBusTestCase):
'''D-Bus startup error'''
self.start_daemon()
out = subprocess.run([self.daemon_path], capture_output=True)
out = subprocess.run([self.daemon_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
self.assertEqual(out.returncode, 1, "power-profile-daemon started but should have failed")
self.stop_daemon()