class documentation

Mixin for tests for the fixers on nmea.NMEAAdapter that adapt from NMEA-specific notations to generic Python objects.

Method setUp Undocumented
Instance Variable adapter The NMEA adapter.
Method _fixerTest A generic adapter fixer test.
def setUp(self): (source)

Undocumented

The NMEA adapter.

def _fixerTest(self, sentenceData, expected=None, exceptionClass=None): (source)

A generic adapter fixer test.

Creates a sentence from the sentenceData and sends that to the adapter. If exceptionClass is not passed, this is assumed to work, and expected is compared with the adapter's internal state. Otherwise, passing the sentence to the adapter is checked to raise exceptionClass.

Parameters
sentenceData:dict mapping str to strRaw sentence content.
expected:dict or NoneThe expected state of the adapter.
exceptionClass:subclass of ExceptionThe exception to be raised by the adapter.