Skip to content

pyproject.toml: remove src from testpaths#201

Closed
mtelka wants to merge 1 commit into
abravalheri:mainfrom
mtelka:test-src
Closed

pyproject.toml: remove src from testpaths#201
mtelka wants to merge 1 commit into
abravalheri:mainfrom
mtelka:test-src

Conversation

@mtelka

@mtelka mtelka commented Sep 9, 2024

Copy link
Copy Markdown

To fix regression introduced a month ago.

Fixes #200.

@abravalheri

abravalheri commented Sep 9, 2024

Copy link
Copy Markdown
Owner

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

henryiii commented Sep 9, 2024

Copy link
Copy Markdown
Collaborator

It wasn't there before, though?

@henryiii

henryiii commented Sep 9, 2024

Copy link
Copy Markdown
Collaborator

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

@mtelka

mtelka commented Sep 9, 2024

Copy link
Copy Markdown
Author

The doctest is run via separate pytest invocation.

@henryiii

henryiii commented Sep 9, 2024

Copy link
Copy Markdown
Collaborator

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

@abravalheri

Copy link
Copy Markdown
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
Copy Markdown
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

mtelka commented Sep 17, 2024

Copy link
Copy Markdown
Author

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