note35 / sinon

Standalone and test framework agnostic Python test spies, stubs and mocks (pronounced "sigh-non").
BSD 2-Clause "Simplified" License
13 stars 4 forks source link

getCall should return None if a bad index is given #11

Closed jonathan-benn closed 7 years ago

jonathan-benn commented 7 years ago

Current behaviour:

spy = sinon.spy()
spy.getCall(0) # throws IndexError

Correct behaviour (from testing Sinon.JS):

spy = sinon.spy()
call = spy.getCall(0)
assert call == None