We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a55ed9e commit bdeeb18Copy full SHA for bdeeb18
1 file changed
tests/test_containers.py
@@ -1,5 +1,6 @@
1
"""Test cases for the containers module."""
2
3
+import copy
4
from dataclasses import dataclass
5
from typing import Any
6
@@ -481,3 +482,14 @@ def test_multi_maps_list_info(snapshot: SnapshotAssertion) -> None:
481
482
deserialized = MultiMapsList.from_dict(data)
483
assert isinstance(deserialized, MultiMapsList)
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
0 commit comments