support/testing/tests/package/test_python_waitress: rework assertion
Like Yann E. Morin did for support/testing/tests/package/test_python_django.py, adjust the logic to avoid the weird "self.assertTrue(False, ...)" construct, and instead test exit_code after the loop. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
@@ -30,5 +30,4 @@ class TestPythonWaitress(TestPythonPackageBase):
|
||||
if exit_code == 0:
|
||||
self.assertEqual(output[0], 'Hello, World!')
|
||||
break
|
||||
else:
|
||||
self.assertTrue(False, "Timeout while waiting for waitress server")
|
||||
self.assertEqual(exit_code, 0, "Timeout while waiting for django server")
|
||||
|
||||
Reference in New Issue
Block a user