File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515__pycache__
1616examples /__pycache__
1717meshtastic.spec
18+ .hypothesis /
Original file line number Diff line number Diff line change 66from unittest .mock import patch
77
88import pytest
9+ from hypothesis import given , strategies as st
910
1011from meshtastic .supported_device import SupportedDevice
1112from meshtastic .mesh_pb2 import MyNodeInfo
@@ -577,3 +578,18 @@ def test_acknowledgement_reset():
577578 assert test_ack_obj .receivedTraceRoute is False
578579 assert test_ack_obj .receivedTelemetry is False
579580 assert test_ack_obj .receivedPosition is False
581+
582+ @given (a_string = st .text (
583+ alphabet = st .characters (
584+ codec = 'ascii' ,
585+ min_codepoint = 0x5F ,
586+ max_codepoint = 0x7A ,
587+ exclude_characters = r'`' ,
588+ )).filter (
589+ lambda x : x not in ['' ] and x [0 ] not in "_" and x [- 1 ] not in '_' and not re .search (r'__' , x )
590+ ))
591+ def test_roundtrip_snake_to_camel_camel_to_snake (a_string ):
592+ value0 = snake_to_camel (a_string = a_string )
593+ value1 = camel_to_snake (a_string = value0 )
594+ assert a_string == value1 , (a_string , value1 )
595+
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ autopep8
1414pylint
1515pytest
1616pytest-cov
17+ hypothesis
1718pyyaml
1819pytap2
1920pdoc3
You can’t perform that action at this time.
0 commit comments