From 35cc8e0f4de7959b655a25c0ffbf73e2e97e9d73 Mon Sep 17 00:00:00 2001 From: Peter Van Dyken Date: Tue, 20 Feb 2024 14:33:20 -0500 Subject: [PATCH] Add character exclusion to copier call test --- snakebids/tests/test_admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snakebids/tests/test_admin.py b/snakebids/tests/test_admin.py index a82c3336..a26b9505 100644 --- a/snakebids/tests/test_admin.py +++ b/snakebids/tests/test_admin.py @@ -133,7 +133,9 @@ def test_create_fails_when_snakebids_version_specifies_extras( @given( name=st.from_regex(r"^[a-zA-Z_][a-zA-Z_0-9]*$"), - version=st.text(st.characters(blacklist_characters=["@", ";", "["])) + version=st.text(st.characters(blacklist_characters=["@", ";", "["])).filter( + lambda s: not s.startswith("-") + ) | st.none(), ) @allow_function_scoped