facebook / facebook/TestSlide

Improve StrictMock & mock_callable exception messages

Open
#234 0 comments 0 reactions 1 assignee Claimed by @fornellas View on GitHub
Better Error Messages enhancement Hacktoberfest
Dominant language
Python
Stars
149
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Currently we raise things like `UnexpectedCallArguments` telling about "behavior". This confuses a lot of users constantly.

@karlodwyer suggested doing things like:

- UnexpectedCallArguments > UnmatchedCallReceived
- explain there's no configured mocks to answer this call
- explain which calls the mock is configured to accept.

Le's apply this "make it clearer mindset" to all existing StrictMock & mock_callable exceptions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.