Allow operation.py to ignore TACAN rules

This commit is contained in:
Magnus Wolffelt
2021-08-18 00:06:34 +02:00
parent f63a35b1fa
commit 34ff5fbc6a
3 changed files with 22 additions and 4 deletions

View File

@@ -24,6 +24,15 @@ def test_allocate_first_few_channels() -> None:
assert chan3 == TacanChannel(32, TacanBand.X)
def test_reserve_ignoring_rules() -> None:
registry = TacanRegistry()
with pytest.raises(TacanChannelForbiddenError):
registry.reserve(TacanChannel(16, TacanBand.X), TacanUsage.TransmitReceive)
registry.reserve(
TacanChannel(16, TacanBand.X), TacanUsage.TransmitReceive, ignore_rules=True
)
def test_allocate_different_usages() -> None:
"""Make sure unallocated channels for one use don't make channels unavailable for other usage"""
registry = TacanRegistry()