Properly wait for server shutdown in test harness teardown.

pull/7/head
Ferry Boender 10 years ago
parent 1050b36181
commit 7733eef9fd
  1. 4
      test/test.py

@ -232,6 +232,10 @@ class WebAppTest(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
cls.sf.shutdown() cls.sf.shutdown()
while True:
time.sleep(0.1)
if not cls.sf.running:
break
def testError404(self): def testError404(self):
r = requests.get('http://localhost:8002/nosuchurl') r = requests.get('http://localhost:8002/nosuchurl')

Loading…
Cancel
Save