Skip to content

Class-based method stub cannot chain throws #42

@jonathan-benn

Description

@jonathan-benn
class A:
	def B(self):
		return 5
stub = sinon.stub(A, 'B').onFirstCall().throws(BaseException('Hello World')).onSecondCall().returns(42)
stub() # error
stub()
stub()
stub.restore()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions