From 7596cd994661175d18953da01d751555cfc5f682 Mon Sep 17 00:00:00 2001 From: Alexey Snigir <35569332+l0uden@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:43:29 +0100 Subject: [PATCH] [QA] Ignore PytestUnraisableExceptionWarning (#856) Co-authored-by: Antony Milne <49395058+antonymilne@users.noreply.github.com> --- ...102_alexey_snigir_pytest_warning_ignore.md | 48 +++++++++++++++++++ vizro-core/tests/integration/test_examples.py | 9 ++-- 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md diff --git a/vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md b/vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md new file mode 100644 index 000000000..7c0d58d4f --- /dev/null +++ b/vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-core/tests/integration/test_examples.py b/vizro-core/tests/integration/test_examples.py index ed120bb87..a983469c3 100644 --- a/vizro-core/tests/integration/test_examples.py +++ b/vizro-core/tests/integration/test_examples.py @@ -41,15 +41,16 @@ def dashboard(request, monkeypatch): # Ignore deprecation warning until this is solved: https://github.com/plotly/dash/issues/2590 -# The `features` examples do add_type, which ideally we would clean up afterwards to restore vizro.models to its -# previous state. Since we don't currently do this, `hatch run test` fails. +# The `features` examples do add_type, which ideally we would clean up afterwards to restore vizro.models to +# its previous state. Since we don't currently do this, `hatch run test` fails. # This is difficult to fix fully by un-importing vizro.models though, since we use `import vizro.models as vm` - see # https://stackoverflow.com/questions/437589/how-do-i-unload-reload-a-python-module. -@pytest.mark.filterwarnings("ignore:HTTPResponse.getheader()") +@pytest.mark.filterwarnings("ignore:HTTPResponse.getheader():DeprecationWarning") # Ignore as it doesn't affect the test run @pytest.mark.filterwarnings("ignore::pytest.PytestUnhandledThreadExceptionWarning") +@pytest.mark.filterwarnings("ignore:unclosed file:ResourceWarning") # Ignore for lower bounds because of plotly==5.12.0 -@pytest.mark.filterwarnings("ignore:.*The behavior of DatetimeProperties.to_pydatetime is deprecated.*:FutureWarning") +@pytest.mark.filterwarnings("ignore:The behavior of DatetimeProperties.to_pydatetime is deprecated:FutureWarning") @pytest.mark.parametrize( "example_path, version", [