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

Projectile test file filtering #38

Closed
RJTK opened this issue Nov 19, 2020 · 5 comments
Closed

Projectile test file filtering #38

RJTK opened this issue Nov 19, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@RJTK
Copy link

RJTK commented Nov 19, 2020

The documentation surrounding the use of projectile to filter test files could be improved. My test directory wasn't recognized by projectile and therefore the projectile-test-files function used in python-pytest--select-test-files was filtering out everything and I just got "No test files found" messages without further explanation.

Possibly have a configuration variable that allows turning off the projectile-test-files filtering, or just add a blurb about ensuring projectile's test-dir is properly set in the docs or the error message.

@wbolster
Copy link
Owner

wbolster commented Nov 21, 2020

hmmm, never experienced this myself, but i see how this can be confusing.

would it be enough to silently fallback to listing all project files in case projectile-test-files doesn't yield anything?

@wbolster wbolster added the enhancement New feature or request label Nov 21, 2020
@RJTK
Copy link
Author

RJTK commented Nov 21, 2020

That's probably adequate, though wouldn't help the user find the actual problem.

@wbolster
Copy link
Owner

🤔

showing an error and pointing to a (currently nonexisting) config flag isn't really helping either, i think?

and a global config flag is also not really helping, since it affects all projects, not just the one that doesn't have a working projectile-test-files for some reason. (and it adds complexity.)

not sure if it's possible to show a warning somehow. messages would usually appear at the bottom of the screen, but the whole interaction here involves reading from the minibuffers, which also puts stuff at the bottom of the screen... 😐

@RJTK
Copy link
Author

RJTK commented Nov 24, 2020

It's indeed probably best to keep it simple -- I'd probably just add a sentence to the documentation. e.g. where it says "note that python-pytest.el uses projectile for some of its features, e.g. finding associated test files. this package is intended to work correctly even without any projectile configuration, since it will likely do the right thing if a project has a conventional layout."

Could be e.g. "note that python-pytest.el uses projectile for some features, e.g. locating test files according to projectile-test-files. This package is intended to work correctly even without any projectile configuration and will likely do the right thing if a project has a conventional layout. However, an incorrectly configured projectile will likely break python-pytest.el functionality."

@wbolster wbolster added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 5, 2021
@wbolster
Copy link
Owner

wbolster commented Nov 7, 2021

i've changed the behaviour of python-pytest-files to show test files if any were found, and if not, show all files instead.

@wbolster wbolster removed help wanted Extra attention is needed good first issue Good for newcomers labels Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants