Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to invoke local stub before global stub #920

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

mkasztelnik
Copy link
Contributor

We have a similar problem as described in #171 in the project currently I'm working on. Since I did not found PR for this issue I created this one.

By default, nothing is changed in the API but it is possible to give the after_stubs option while registering global stub. Then the global stub will be used only when no "local" stub is found.

@bblimke
Copy link
Owner

bblimke commented Nov 12, 2020

@mkasztelnik thank you. wow, a PR after 8 years.

after_stubs sounds a bit ambiguous to me. Perhaps before_local_stubs and after_local_stubs would be better?

@mkasztelnik mkasztelnik force-pushed the 171-global-stubs-order branch from a90c463 to 2aedab9 Compare November 12, 2020 07:37
@mkasztelnik
Copy link
Contributor Author

I was sure that there is a better name for the order values :) Thank you for the great library.

@mkasztelnik mkasztelnik force-pushed the 171-global-stubs-order branch from 2aedab9 to 90eaa4a Compare November 12, 2020 07:44
@bblimke
Copy link
Owner

bblimke commented Nov 12, 2020

Awesome, thank you!

@bblimke bblimke merged commit bacb8a5 into bblimke:master Nov 12, 2020
@bblimke
Copy link
Owner

bblimke commented Nov 12, 2020

@mkasztelnik version 3.10 is now released

@mkasztelnik
Copy link
Contributor Author

❤️ 💚 💛 💙

@mkasztelnik mkasztelnik deleted the 171-global-stubs-order branch November 12, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants