diff --git a/tests/notebooks/test__community_and_functions.py b/tests/notebooks/test__community_and_functions.py index ac8208dad..a36b0f796 100644 --- a/tests/notebooks/test__community_and_functions.py +++ b/tests/notebooks/test__community_and_functions.py @@ -32,7 +32,7 @@ def cwd(path): @pytest.mark.parametrize( - "notebook_path", [nb for nb in iterate_notebooks() if _should_test_notebook(nb)] + "notebook_path", list(filter(_should_test_notebook, iterate_notebooks())) ) def test_notebooks(notebook_path: str) -> None: with cwd(os.path.dirname(notebook_path)): diff --git a/tests/test_all_notebooks_are_tested.py b/tests/test_all_notebooks_are_tested.py index fd27aea34..0a6bfae0b 100644 --- a/tests/test_all_notebooks_are_tested.py +++ b/tests/test_all_notebooks_are_tested.py @@ -11,7 +11,7 @@ def all_test_file_names() -> list[str]: @pytest.mark.parametrize( - "notebook_name", [os.path.basename(nb) for nb in get_all_notebooks()] + "notebook_name", list(map(os.path.basename, get_all_notebooks())) ) def test_is_notebook_tested(notebook_name: str, all_test_file_names: list[str]): if not _should_skip_notebook(notebook_name):