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

v3: Allow mocks from different source packages in the same file #888

Open
LandonTClipp opened this issue Jan 6, 2025 · 0 comments
Open
Labels

Comments

@LandonTClipp
Copy link
Collaborator

I currently do not allow this because mockery attempts to automatically determine if the output mock file is in the same package as the originating interface. I initially attempted to allow multiple packages in the output mock but was running into issues with this "is inpackage" determination, so I decided to defer this until later.

This is not theoretically impossible, it just requires extracting this logic out of the template generator constructor and into the logic that populates imports for each method.

@LandonTClipp LandonTClipp added the v3 label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant