def test_disconnect_one_invalid(timer):
 func1 = mock.Mock()
 func2 = mock.Mock()
 timer.timeout.connect(func1)
 with pytest.raises(TypeError):
  timer.timeout.disconnect(func2)
 assert (not func1.called)
 assert (not func2.called)
 timer.timeout.emit()
 func1.assert_called_once_with()

def test_disconnect_one_invalid ( timer ) : func1 = mock . Mock ( ) func2 = mock . Mock ( ) timer . timeout . connect ( func1 ) with pytest . raises ( TypeError ) : timer . timeout . disconnect ( func2 ) assert ( not func1 . called ) assert ( not func2 . called ) timer . timeout . emit ( ) func1 . assert_called_once_with ( )
test disconnecting with an invalid connection .