From d835c3356f1c33bcfd7a57e23f51420d9a0251cd Mon Sep 17 00:00:00 2001 From: Robert Bradley Date: Fri, 1 Nov 2024 21:48:55 +0000 Subject: [PATCH] feat: pytest fixes --- .gitignore | 1 + conftest.py | 1 - pyproject.toml | 1 - pytest.ini | 7 +++++++ 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 pytest.ini diff --git a/.gitignore b/.gitignore index 8320f59ccb..2f4f8aa8c0 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ !*.Dockerfile !docker-compose.yml !.vscode/launch.json +!pytest.ini # Or these folders... !.github diff --git a/conftest.py b/conftest.py index 0c77050221..d121d01f00 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,6 @@ import pytest from _pytest.config.argparsing import Parser from _pytest.fixtures import FixtureRequest -import asyncio from pytest_socket import enable_socket, disable_socket, socket_allow_hosts diff --git a/pyproject.toml b/pyproject.toml index 73ba99c1d1..835ae97a54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,6 @@ include = ["uk_bin_collection"] pythonpath = [ ".", "uk_bin_collection" ] -asyncio_mode = "auto" [tool.flit.metadata] module = "uk_bin_collection" diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000..2412f4de21 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,7 @@ +[pytest] +pythonpath = ./uk_bin_collection +asyncio_mode=auto +# Unsetting this will cause testing to fail with a key error for any VALID value +# Leaving it out allows pytest to run, but will generate a warning +asyncio_default_fixture_loop_scope=function +filterwarnings=ignore::DeprecationWarning \ No newline at end of file