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

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_raiseOnMissingAttributeAccess Accessing a nonexistent attribute raises AttributeError.
Method test_raiseOnBadAttributeAccess Accessing bogus attributes raises AttributeError, *even* when that attribute actually is in the sentence data.
Method test_unknownTypeRepr Test the repr of an empty sentence of unknown type.
Method test_knownTypeRepr Test the repr of an empty sentence of known type.
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_raiseOnMissingAttributeAccess(self):

Accessing a nonexistent attribute raises AttributeError.

def test_raiseOnBadAttributeAccess(self):

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

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

Builds the expected repr for a sentence.

ParameterssentenceTypeThe name of the sentence type (e.g "GPGGA"). (type: str)
dataReprThe repr of the data in the sentence. (type: str)
ReturnsThe expected repr of the sentence. (type: str)
def test_unknownTypeRepr(self):

Test the repr of an empty sentence of unknown type.

def test_knownTypeRepr(self):

Test the repr of an empty sentence of known type.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.