Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Fix pytest unit test failure #287

Closed

Conversation

bethebunny
Copy link
Contributor

Summary:
pytest-dev/pytest#3151

If there isn't a init.py file in a directory, pytest imports a test file into the global namespace. This means in a package structure not including init.py files, test files in separate directories with the same basename (filename not including directory) will overlap, and fortunately pytest fails with a visible error message rather than not executing the tests.

Differential Revision: D14031515

Summary:
pytest-dev/pytest#3151

If there isn't a __init__.py file in a directory, pytest imports a test file into the global namespace. This means in a package structure not including __init__.py files, test files in separate directories with the same basename (filename not including directory) will overlap, and fortunately pytest fails with a visible error message rather than not executing the tests.

Differential Revision: D14031515

fbshipit-source-id: a6032e44eda2b32138235e2728925cf56fc24897
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants