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 1
1
"""Test cases for the containers module."""
2
2
3
+ import copy
3
4
from dataclasses import dataclass
4
5
from typing import Any
5
6
@@ -481,3 +482,14 @@ def test_multi_maps_list_info(snapshot: SnapshotAssertion) -> None:
481
482
deserialized = MultiMapsList .from_dict (data )
482
483
assert isinstance (deserialized , MultiMapsList )
483
484
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