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

Provide a fixture that's not named "mock" #4

Closed
kmosher opened this issue Sep 11, 2014 · 3 comments · Fixed by #5
Closed

Provide a fixture that's not named "mock" #4

kmosher opened this issue Sep 11, 2014 · 3 comments · Fixed by #5

Comments

@kmosher
Copy link

kmosher commented Sep 11, 2014

I really like this plugin, but I find calling the fixture "mock" conflicts with the actual mock module. It also results in code that looks wrong to the casual observer if they're familiar with the mock module but aren't aware of this plugin.

Would it be possible to additionally provide this fixture under a synonym like "patcher"?

@nicoddemus
Copy link
Member

Hi,

Yeah, that's something I realized later when started using the plugin more extensively... I think it would be OK to provide a new fixture and keep the old one for backward compatibility, issuing a warning when used (and probably removing it in 1.0).

What you think about mocker instead? I tend towards something closer to the mock module to make clear they are related... 😄

@kmosher
Copy link
Author

kmosher commented Sep 12, 2014

Yeah, I agree that the fixture should still also be available as mock, at least for a while.

I'm ambivalent about mocker vs. patcher. I think they both describe the role of the object pretty well, and should both be pretty intuitive even if you're not aware of what's going on under the hood.

@nicoddemus
Copy link
Member

Thanks for the feedback! 😄

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 a pull request may close this issue.

2 participants