mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix TACAN beacon type import.
The dataclass contructor will not automatically convert the int in the JSON file to the enum type, so our enum equivalence check was not actually working, and could result in us re-allocating a TACAN channel that was used by the map. Fixing this problem surfaces a latent bug, where we can't actually treat duplicate map TACAN channels as a bug because some channels are used by multiple airports in PG.
This commit is contained in:
@@ -4,7 +4,6 @@ from game.radio.tacan import (
|
||||
OutOfTacanChannelsError,
|
||||
TacanBand,
|
||||
TacanChannel,
|
||||
TacanChannelInUseError,
|
||||
TacanRegistry,
|
||||
TacanUsage,
|
||||
)
|
||||
@@ -72,9 +71,8 @@ def test_reserve_all_valid_a2a() -> None:
|
||||
|
||||
def test_reserve_again() -> None:
|
||||
registry = TacanRegistry()
|
||||
with pytest.raises(TacanChannelInUseError):
|
||||
registry.mark_unavailable(TacanChannel(1, TacanBand.X))
|
||||
registry.mark_unavailable(TacanChannel(1, TacanBand.X))
|
||||
registry.mark_unavailable(TacanChannel(1, TacanBand.X))
|
||||
registry.mark_unavailable(TacanChannel(1, TacanBand.X))
|
||||
|
||||
|
||||
def test_tacan_parsing() -> None:
|
||||
|
||||
Reference in New Issue
Block a user