File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11"""Test cases for the containers module."""
22
3+ import copy
34from dataclasses import dataclass
45from typing import Any
56
@@ -481,3 +482,14 @@ def test_multi_maps_list_info(snapshot: SnapshotAssertion) -> None:
481482 deserialized = MultiMapsList .from_dict (data )
482483 assert isinstance (deserialized , MultiMapsList )
483484 assert deserialized == snapshot
485+
486+
487+ def test_accurate_map_flag () -> None :
488+ """Test that we parse the map flag accurately."""
489+ s = S7MaxVStatus .from_dict (STATUS )
490+ assert s .current_map == 0
491+ status = copy .deepcopy (STATUS )
492+ # 252 is a code for no map, it should end up being 63.
493+ status ["map_status" ] = 252
494+ s = S7MaxVStatus .from_dict (status )
495+ assert s .current_map == 63
You can’t perform that action at this time.
0 commit comments