mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-06 07:47:53 +10:00
wip 2
This commit is contained in:
@@ -1,19 +1 @@
|
||||
from multiprocessing import Process
|
||||
|
||||
import pytest
|
||||
from .mock_server.server import start
|
||||
|
||||
server_process = None
|
||||
|
||||
@pytest.hookimpl
|
||||
def pytest_sessionstart(session):
|
||||
global server_process
|
||||
server_process = Process(target=start)
|
||||
server_process.start()
|
||||
|
||||
@pytest.hookimpl
|
||||
def pytest_sessionfinish(session):
|
||||
if server_process is not None:
|
||||
server_process.terminate()
|
||||
server_process.join()
|
||||
|
||||
Reference in New Issue
Block a user