From deeadba420ec9f0aed6eaaa347ae95af018461ac Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 1 Dec 2022 00:04:32 -0500 Subject: [PATCH] test: flattentool leaks file descriptors OpenDataServices/flatten-tool#412 --- tests/test_functional.py | 2 ++ tests/test_general.py | 2 ++ tests/test_hypothesis.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/test_functional.py b/tests/test_functional.py index 4292d984..ae9e72ee 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -934,6 +934,8 @@ def test_url_input_with_version( ), ], ) +# flattentool leaks file descriptors: https://github.com/OpenDataServices/flatten-tool/issues/412 +@pytest.mark.filterwarnings("ignore:unclosed file <_io.BufferedReader name=:ResourceWarning") def test_url_input_with_version_change( server_url, url_input_browser, diff --git a/tests/test_general.py b/tests/test_general.py index fb4c65a5..4db55707 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -213,6 +213,8 @@ NOT_FOUND_URL_EXT = "https://standard.open-contracting.org/latest/en/404.json" +# flattentool leaks file descriptors: https://github.com/OpenDataServices/flatten-tool/issues/412 +@pytest.mark.filterwarnings("ignore:unclosed file <_io.BufferedReader name=:ResourceWarning") def test_get_releases_aggregates(): assert get_releases_aggregates({}) == EMPTY_RELEASE_AGGREGATE assert get_releases_aggregates({"releases": []}) == EMPTY_RELEASE_AGGREGATE diff --git a/tests/test_hypothesis.py b/tests/test_hypothesis.py index 5c121707..ad99a0f7 100644 --- a/tests/test_hypothesis.py +++ b/tests/test_hypothesis.py @@ -51,6 +51,8 @@ def test_explore_page(client, current_app, json_data): @pytest.mark.django_db @pytest.mark.parametrize("current_app", ["cove-ocds"]) +# flattentool leaks file descriptors: https://github.com/OpenDataServices/flatten-tool/issues/412 +@pytest.mark.filterwarnings("ignore:unclosed file <_io.:ResourceWarning") @given(general_json) @example(1) @settings(max_examples=50, deadline=None, suppress_health_check=[HealthCheck.function_scoped_fixture])