def test__get_flap_detents(self):
     detents = at.get_flap_detents()
     # All detents must be integers or floats:
     self.assertTrue(all(isinstance(d, (int, float)) for d in detents))
     # We expect to have quite a lot of detents:
     self.assertGreater(len(detents), 10)
     self.assertLess(len(detents), 20)
     # Must have a value for the retracted state:
     self.assertIn(0, detents)
     # No duplicates:
     self.assertEqual(len(set(detents)), len(detents))
 def test__get_flap_detents(self):
     detents = at.get_flap_detents()
     # All detents must be integers or floats:
     self.assertTrue(all(isinstance(d, (int, float)) for d in detents))
     # We expect to have quite a lot of detents:
     self.assertGreater(len(detents), 10)
     self.assertLess(len(detents), 20)
     # Must have a value for the retracted state:
     self.assertIn(0, detents)
     # No duplicates:
     self.assertEqual(len(set(detents)), len(detents))
예제 #3
0
    # use the nodes from the additional modules in preference to those in the
    # analyzer.
    seen = set()
    seen_add = seen.add
    NODE_MODULES = [x for x in NODE_MODULES if not (x in seen or seen_add(x))]
except ImportError as err:
    # logger.info preferred, but stack trace is important when trying to
    # determine an unexpected ImportError lower down the line.
    import logging
    logger = logging.getLogger(name=__name__)
    logger.addHandler(logging.NullHandler())
    logger.exception("Unable to import analysis_engine/analyser_custom_settings.py")
    pass

##############################################################################
# KPV/KTI Name Values (#2)

# Note: These must be created after the custom settings have been imported.

from flightdatautilities import aircrafttables as at

NAME_VALUES_FLAP = {'flap': at.get_flap_detents()}

NAME_VALUES_SLAT = {'slat': at.get_slat_detents()}

NAME_VALUES_AILERON = {'aileron': at.get_aileron_detents()}

NAME_VALUES_CONF = {'conf': at.get_conf_detents()}

NAME_VALUES_LEVER = {'flap': at.get_lever_detents()}  # XXX: Key must be 'flap'
예제 #4
0
    # analyzer.
    seen = set()
    seen_add = seen.add
    NODE_MODULES = [x for x in NODE_MODULES if not (x in seen or seen_add(x))]
except ImportError as err:
    # logger.info preferred, but stack trace is important when trying to
    # determine an unexpected ImportError lower down the line.
    import logging
    logger = logging.getLogger(name=__name__)
    logger.addHandler(logging.NullHandler())
    logger.exception(
        "Unable to import analysis_engine/analyser_custom_settings.py")
    pass

##############################################################################
# KPV/KTI Name Values (#2)

# Note: These must be created after the custom settings have been imported.

from flightdatautilities import aircrafttables as at

NAME_VALUES_FLAP = {'flap': at.get_flap_detents()}

NAME_VALUES_SLAT = {'slat': at.get_slat_detents()}

NAME_VALUES_AILERON = {'aileron': at.get_aileron_detents()}

NAME_VALUES_CONF = {'conf': at.get_conf_detents()}

NAME_VALUES_LEVER = {'flap': at.get_lever_detents()}  # XXX: Key must be 'flap'