コード例 #1
0
ファイル: test_handler.py プロジェクト: dgvncsz0f/pingpong
 def test_cancel_does_not_invoke_handlers_if_stop_is_set(self):
     m = mock.Mock()
     h = handler.handler()
     h.chain(m)
     h.stop_propagation()
     h.cancel()
     self.assertEqual(0, m.cancel.call_count)
コード例 #2
0
ファイル: test_handler.py プロジェクト: dgvncsz0f/pingpong
 def test_cancel_resets_stop_variable(self):
     m = mock.Mock()
     h = handler.handler()
     h.chain(m)
     h.stop_propagation()
     h.cancel()
     self.assertFalse(h.stop)
コード例 #3
0
ファイル: test_handler.py プロジェクト: dgvncsz0f/pingpong
 def test_cancel_call_all_handlers(self):
     m = mock.Mock()
     h = handler.handler()
     h.chain(m)
     h.cancel()
     m.cancel.assert_called_with()