class documentation

class SentenceTestsMixin:

Known subclasses: twisted.positioning.test.test_sentence.MixinTests

View In Hierarchy

Tests for positioning protocols and their respective sentences.

Method test_attributeAccess A sentence attribute gets the correct value, and accessing an unset attribute (which is specified as being a valid sentence attribute) gets None.
Method test_knownTypeRepr Test the repr of an empty sentence of known type.
Method test_raiseOnBadAttributeAccess Accessing bogus attributes raises AttributeError, *even* when that attribute actually is in the sentence data.
Method test_raiseOnMissingAttributeAccess Accessing a nonexistent attribute raises AttributeError.
Method test_unknownTypeRepr Test the repr of an empty sentence of unknown type.
Class Variable reprTemplate Undocumented
Class Variable sentenceType Undocumented
Method _expectedRepr Builds the expected repr for a sentence.
def test_attributeAccess(self):

A sentence attribute gets the correct value, and accessing an unset attribute (which is specified as being a valid sentence attribute) gets None.

def test_knownTypeRepr(self):

Test the repr of an empty sentence of known type.

def test_raiseOnBadAttributeAccess(self):

Accessing bogus attributes raises AttributeError, *even* when that attribute actually is in the sentence data.

def test_raiseOnMissingAttributeAccess(self):

Accessing a nonexistent attribute raises AttributeError.

def test_unknownTypeRepr(self):

Test the repr of an empty sentence of unknown type.

reprTemplate: str =

Undocumented

sentenceType: str =

Undocumented

def _expectedRepr(self, sentenceType='unknown type', dataRepr=''):

Builds the expected repr for a sentence.

Parameters
sentenceType:strThe name of the sentence type (e.g "GPGGA").
dataRepr:strThe repr of the data in the sentence.
Returns
strThe expected repr of the sentence.