MCPcopy Index your code
hub / github.com/webpy/webpy / test_stopsimpleserver

Method test_stopsimpleserver

tests/test_application.py:413–432  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

411 self.assertEqual(f("/admin"), "foo=bar; Path=/admin/")
412
413 def test_stopsimpleserver(self):
414 urls = ("/", "index")
415
416 class index:
417 def GET(self):
418 pass
419
420 # reset command-line arguments
421 sys.argv = ["code.py"]
422
423 app = web.application(urls, locals())
424 thread = threading.Thread(target=app.run)
425
426 thread.start()
427 time.sleep(1)
428 self.assertTrue(thread.is_alive())
429
430 app.stop()
431 thread.join(timeout=1)
432 self.assertFalse(thread.is_alive())

Callers

nothing calls this directly

Calls 2

stopMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected