Opened 5 years ago

Last modified 5 years ago

#5173 enhancement new

trial should support a assertNotUnequal method

Reported by: cyli Owned by:
Priority: normal Milestone:
Component: trial Keywords:
Cc: jml, ivank Branch:


assertEqual and assertEquals tests the __eq__ method. It would be useful to have a method to test that __ne__ correctly returns false for equal objects.

Change History (3)

comment:1 Changed 5 years ago by DefaultCC Plugin

  • Cc jml added

comment:2 Changed 5 years ago by ivank

  • Cc ivank added

What do you think about having an assert method that tests both ==, not !=, and cmp at the same time? I noticed that right now you're writing tests where assertEqual and assertNotUnequal are essentially duplicated. Having an assert method that does both would make things less redundant.

I have an assertReallyEqual and assertReallyNotEqual in , but of course the implementation in Twisted could be different.

comment:3 Changed 5 years ago by exarkun

twisted.python.test.test_util.EqualityTests might have some ideas to incorporate into a general helper.

Note: See TracTickets for help on using tickets.