Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
joelee2012 committed Dec 22, 2023
1 parent f4274a9 commit 427131a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ async def _retrive(item):

# workaround for https://github.com/pytest-dev/pytest-asyncio/issues/371

if sys.version_info.minor < 12:
@pytest.fixture(scope="session")
def event_loop():
policy = asyncio.get_event_loop_policy()
loop = policy.new_event_loop()
yield loop
if loop.is_running():
time.sleep(2)
loop.close()

@pytest.fixture(scope="session")
def event_loop():
policy = asyncio.get_event_loop_policy()
loop = policy.new_event_loop()
yield loop
if loop.is_running():
time.sleep(2)
loop.close()
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist = style, pylint, py3
[testenv]
deps = respx
pytest-cov
pytest-asyncio
pytest-asyncio==0.21.1
commands =
pytest -v --cov=api4jenkins tests/unit \
-o junit_family=xunit2 \
Expand All @@ -28,7 +28,7 @@ commands =

[testenv:integration]
deps = pytest-cov
pytest-asyncio
pytest-asyncio==0.21.1
pyyaml
passenv = JENKINS_*
commands =
Expand Down

0 comments on commit 427131a

Please sign in to comment.