Use TACAN channels more selectively, use pytest (#1554)

* Use TACAN channels more selectively

* Increase tacan range to 126

* Use pytest and add workflow

* Skip faction tests due to outdated test data

* Run mypy on tests directory also

* Use iterators for bands AND usages, add tests
This commit is contained in:
Magnus Wolffelt
2021-08-17 23:14:54 +02:00
committed by GitHub
parent 57e78d5c55
commit f63a35b1fa
10 changed files with 229 additions and 19 deletions

View File

@@ -34,7 +34,7 @@ from gen.kneeboard import KneeboardGenerator
from gen.lasercoderegistry import LaserCodeRegistry
from gen.naming import namegen
from gen.radios import RadioFrequency, RadioRegistry
from gen.tacan import TacanRegistry
from gen.tacan import TacanRegistry, TacanUsage
from gen.triggergen import TRIGGER_RADIUS_MEDIUM, TriggersGenerator
from gen.visualgen import VisualGenerator
from .. import db
@@ -228,7 +228,9 @@ class Operation:
if beacon.channel is None:
logging.error(f"TACAN beacon has no channel: {beacon.callsign}")
else:
cls.tacan_registry.reserve(beacon.tacan_channel)
cls.tacan_registry.reserve(
beacon.tacan_channel, TacanUsage.TransmitReceive
)
@classmethod
def _create_radio_registry(