Skip to content

Commit 46273a4

Browse files
committed
add unit tests for arinc767 and arinc717 config to bump coverage
1 parent 197810a commit 46273a4

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

‎tests/test_arinc717_config.py‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from __future__ import annotations
2+
3+
from pyarinc.arinc717.config import normalize_config
4+
5+
6+
def test_arinc717_normalize_config_identity():
7+
"""Ensure ARINC 717 normalize_config acts as a clean pass-through dictionary normalizer."""
8+
sample_config = {
9+
"ALTITUDE": {
10+
"subframe": 1,
11+
"word": 12,
12+
"bit_offset": 0,
13+
"length": 12,
14+
"rate": 1.0,
15+
"data_type": "BNR",
16+
}
17+
}
18+
19+
result = normalize_config(sample_config)
20+
21+
# Verify it returns the exact same structure
22+
assert result == sample_config
23+
# Verify it returns a dictionary reference
24+
assert isinstance(result, dict)

‎tests/test_arinc767_config.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from pyarinc.arinc767.config import normalize_config
2+
3+
4+
def test_normalize_config_identity():
5+
"""Ensure normalize_config acts as a clean pass-through dictionary normalizer."""
6+
sample_config = {
7+
"MACH": {
8+
"word": 0,
9+
"bit_offset": 0,
10+
"length": 9,
11+
"rate": 1.0,
12+
"frame_id_767": 3,
13+
"cob_formula": "raw*0.00390625",
14+
}
15+
}
16+
17+
result = normalize_config(sample_config)
18+
19+
# Verify it returns the exact same structure
20+
assert result == sample_config
21+
# Verify it returns a dictionary reference
22+
assert isinstance(result, dict)

0 commit comments

Comments
 (0)