From 5f5df4b21dbd0cc75ab0929a36cce64c34528798 Mon Sep 17 00:00:00 2001 From: Peter Van Dyken Date: Tue, 20 Feb 2024 14:31:41 -0500 Subject: [PATCH] Catch our own warnings in pybidsdb tests --- snakebids/tests/test_generate_inputs.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/snakebids/tests/test_generate_inputs.py b/snakebids/tests/test_generate_inputs.py index eb226337..9070cab8 100644 --- a/snakebids/tests/test_generate_inputs.py +++ b/snakebids/tests/test_generate_inputs.py @@ -112,9 +112,14 @@ def test_old_params_passed_on_to_new( pybids_database_dir: str, pybids_database_reset: bool, ): - assert (pybids_database_dir, pybids_database_reset) == _normalize_database_args( - None, None, pybids_database_dir, pybids_database_reset - ) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=UserWarning) + assert ( + pybids_database_dir, + pybids_database_reset, + ) == _normalize_database_args( + None, None, pybids_database_dir, pybids_database_reset + ) @given( pybidsdb_reset=st.booleans() | st.none(),