class documentation
class ComparisonTestsMixin: (source)
Known subclasses: twisted.conch.test.test_knownhosts.HashedEntryTests
, twisted.names.test.test_dns.EDNSMessageEqualityTests
, twisted.names.test.test_dns.EqualityTests
, twisted.names.test.test_dns.MessageComparisonTests
, twisted.names.test.test_dns.OPTHeaderTests
, twisted.names.test.test_dns.OPTVariableOptionTests
A mixin which defines a method for making assertions about the correctness of an implementation of == and !=.
Use this to unit test objects which follow the common convention for == and !=:
- The object compares equal to itself
- The object cooperates with unrecognized types to allow them to implement the comparison
- The object implements not-equal as the opposite of equal
Method | assert |
Assert that firstValueOne is equal to secondValueOne but not equal to valueOne and that it defines equality cooperatively with other types it doesn't know about. |
Assert that firstValueOne is equal to secondValueOne but not equal to valueOne and that it defines equality cooperatively with other types it doesn't know about.
Parameters | |
first | An object which is expected to compare as equal to secondValueOne and not equal to valueTwo. |
second | A different object than firstValueOne but which is expected to compare equal to that object. |
value | An object which is expected to compare as not equal to firstValueOne. |