From 84dff753990702bfcaa1e532d5863f57905cf746 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Sat, 24 Aug 2024 23:38:48 -0700 Subject: [PATCH] allow for underscore-only stuff in camel_to_snake, silly as that is --- meshtastic/tests/test_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/tests/test_util.py b/meshtastic/tests/test_util.py index e1930e6..09f67fe 100644 --- a/meshtastic/tests/test_util.py +++ b/meshtastic/tests/test_util.py @@ -599,7 +599,7 @@ def test_roundtrip_snake_to_camel_camel_to_snake(a_string): def test_fuzz_camel_to_snake(a_string): """Test that camel_to_snake produces outputs with underscores for multi-word camelcase""" result = camel_to_snake(a_string) - assert "_" in result or result == a_string.lower() + assert "_" in result or result == a_string.lower().replace("_", "") @given(st.text()) def test_fuzz_snake_to_camel(a_string):