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

Installing gcp-storage-emulator==2022.4.9 breaks tests #163

Closed
jakubczaplicki opened this issue Apr 13, 2022 · 1 comment
Closed

Installing gcp-storage-emulator==2022.4.9 breaks tests #163

jakubczaplicki opened this issue Apr 13, 2022 · 1 comment

Comments

@jakubczaplicki
Copy link

jakubczaplicki commented Apr 13, 2022

Describe the bug
Having a repo with tests under tests folder, installation of gcp-storage-emulator causes pytest to detect :
/venv/lib/python3.9/site-packages/tests/__init__.py instead.

To Reproduce
Prepare a small repo with a folder tests, in which a file imports something from tests module (e.g. fixtures).
Run pytest before installation of the gcp-storage-emulator and after.

Expected behavior
The tests of any system should work as before the installation.

System (please complete the following information):

  • OS version: MacOS
  • Python version: 3.9.12
  • gcp-storage-emulator version: 2022.4.9

Additional context
I suspect the tests is being recognised as a module for installation and is being installed as such.

@oittaa
Copy link
Owner

oittaa commented Apr 13, 2022

I suspect the tests is being recognised as a module for installation and is being installed as such.

Oh yeah, you're right. #164 should fix the issue. I moved the package under src which seems to be the modern recommendation and now find_packaged() in setup.py should only detect the files inside that directory.

There's a new release 2022.4.13 which includes the change.

Thanks for reporting the issue!

@oittaa oittaa closed this as completed Apr 13, 2022
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

No branches or pull requests

2 participants