def setUp(self): global expect expect = new_expect(__eq__=self.assertEquals, is_raised=self.assertRaises, __ne__=self.assertNotEquals, __gt__=self.assertGreater) self.expect = new_expect()
def test_delegates_to_eq(self): assert_equal = Mock(name='assert_equal') expect = new_expect(__eq__=assert_equal) expect('a') == 'b' assert_equal.assert_called_once_with('a', 'b')