twisted.test.testutils.ComparisonTestsMixin(object)
class documentationtwisted.test.testutils
(View In Hierarchy)
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 !=
:
Method | assertNormalEqualityImplementation | 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 | firstValueOne | An object which is expected to compare as equal to
secondValueOne and not equal to valueTwo . |
secondValueOne | A different object than firstValueOne but which is expected to
compare equal to that object. | |
valueTwo | An object which is expected to compare as not equal to
firstValueOne . |