fix issue #255 - cancel a pending operation only if there is an operatio...

...n pending
This test is looking better, but should there be an expectation after this `cancel()`? If we only expect it to not raise an exception, can we add a comment to that effect?