Opened 7 years ago

Last modified 7 years ago

#5173 enhancement new

trial should support a assertNotUnequal method

Reported by: Ying Li Owned by:
Priority: normal Milestone:
Component: trial Keywords:
Cc: Jonathan Lange, 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 7 years ago by DefaultCC Plugin

Cc: Jonathan Lange added

comment:2 Changed 7 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 7 years ago by Jean-Paul Calderone

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

Note: See TracTickets for help on using tickets.