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

pyproject.toml: remove src from testpaths #201

Closed
wants to merge 1 commit into from

Conversation

mtelka
Copy link

@mtelka mtelka commented Sep 9, 2024

To fix regression introduced a month ago.

Fixes #200.

@abravalheri
Copy link
Owner

abravalheri commented Sep 9, 2024

Thank you very much @mtelka. Let's think about this a bit better. Removing src from paths mean that the doctests will no longer run, right?

@henryiii
Copy link
Collaborator

henryiii commented Sep 9, 2024

It wasn't there before, though?

@henryiii
Copy link
Collaborator

henryiii commented Sep 9, 2024

How are we running doctests? Pytest doesn't just natively run them. Adding src would mean there are test_* functions in the source.

@mtelka
Copy link
Author

mtelka commented Sep 9, 2024

The doctest is run via separate pytest invocation.

@henryiii
Copy link
Collaborator

henryiii commented Sep 9, 2024

Ahh, the src there overrides whatever is in here anyway.

@abravalheri
Copy link
Owner

The doctest is run via separate pytest invocation.

We might be running twice then, as we do pass --doctest-modules in the pyproject.toml.

I am OK with this approach (thank you very much for investigating!), but it would be nice to understand why that configuration seemly disconnected is causing the problem.

Are we sure that we are not simply removing a side-effect instead of finding the root cause?

@abravalheri
Copy link
Owner

We might be running twice then, as we do pass --doctest-modules in the pyproject.toml.

If I remember it well, the point of passing src as a test path and adding --doctest-modules in pyproject.toml was to not have to run a separated process for pytest. I probably forgot to change tox.ini 😅

@mtelka
Copy link
Author

mtelka commented Sep 17, 2024

Closing in favor of #203.

@mtelka mtelka closed this Sep 17, 2024
@mtelka mtelka deleted the test-src branch September 17, 2024 19:45
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 this pull request may close these issues.

Many tests fails with generator raised StopIteration
3 participants