MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / setUpClass

Method setUpClass

test/browser_common.py:793–809  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

791
792 @classmethod
793 def setUpClass(cls):
794 super().setUpClass()
795 cls.PORT = 8888 + (0 if worker_id is None else worker_id)
796 cls.SERVER_URL = f'http://localhost:{cls.PORT}'
797 cls.HARNESS_URL = f'{cls.SERVER_URL}/run_harness'
798
799 if not has_browser() or EMTEST_BROWSER == 'node':
800 errlog(f'[Skipping browser launch (EMTEST_BROWSER={EMTEST_BROWSER})]')
801 return
802
803 cls.harness_in_queue = queue.Queue()
804 cls.harness_out_queue = queue.Queue()
805 cls.harness_server = HttpServerThread(make_test_server(cls.harness_in_queue, cls.harness_out_queue, cls.PORT))
806 cls.harness_server.start()
807
808 errlog(f'[Browser harness server on thread {cls.harness_server.name}]')
809 cls.browser_open(cls.HARNESS_URL)
810
811 @classmethod
812 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 6

errlogFunction · 0.90
has_browserFunction · 0.85
HttpServerThreadClass · 0.85
make_test_serverFunction · 0.85
browser_openMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected