Skip to content

Commit

Permalink
cleanup conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
jiakf committed Feb 13, 2024
1 parent e017fac commit 4cc2473
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ def get_big_content(n: int) -> str:
}


# TODO: this function fixes the windows builds, the linux builds are fine, but breaks the macos builds
def run():
def run_mock_server():
# import mock_server here to avoid cyclic import
import mock_server

Expand All @@ -126,15 +125,9 @@ def run():

@pytest.fixture(scope="class")
def setup_mock_server() -> None:
# import mock_server here to avoid cyclic import
# import mock_server

# server = Process(target=mock_server.app.run)
server = Process(target=run)
server = Process(target=run_mock_server)
server.start()
time.sleep(
10
) # takes longer with python3.8 on macos, i guess fork defaults with 'spawn' now instead of 'fork'
time.sleep(5) # starting with py38, takes longer for process to start on macOS
yield
server.terminate()

Expand Down

0 comments on commit 4cc2473

Please sign in to comment.