From b1d47c8aaeb69ce9132372753d1b4a33b2a36d1c Mon Sep 17 00:00:00 2001 From: Beth Probert Date: Mon, 9 Mar 2026 14:09:00 +0000 Subject: [PATCH] Add final test case for path checking --- tests/unit_tests/test_utilities.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit_tests/test_utilities.py b/tests/unit_tests/test_utilities.py index 6df07dec..a1256e4b 100644 --- a/tests/unit_tests/test_utilities.py +++ b/tests/unit_tests/test_utilities.py @@ -119,6 +119,13 @@ def test_make_path_safe_reserved_in_components(caplog, path): ) +def test_make_path_safe_reserved_name_components(caplog): + """Test reserved names are okay as part of a larger dir name.""" + with caplog.at_level(logging.WARNING): + assert make_path_safe("chilli con carne/recipe")[0] == "chilli con carne/recipe" + assert len(caplog.records) == 0 + + def test_make_path_safe_trailing_space_in_components(caplog): """Test trailing spaces in path components.""" with caplog.at_level(logging.WARNING):