-
Notifications
You must be signed in to change notification settings - Fork 67
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
ignore package pytest config #246
Conversation
avoids conflicts with base package test config, since we aren't running the package's tests. For example, jupyter-server has `addopts = --doctest-modules`, but check-links has `-p no:doctest`, which removes the `--doctest-modules` option.
Thanks for submitting your first pull request! You are awesome! 🤗 |
@@ -54,6 +54,9 @@ def check_links(ignore_glob, ignore_links, cache_file, links_expire): | |||
cmd += f"--check-links-cache-name {cache_dir}/check-release-links " | |||
# do not run doctests, since they might depend on other state. | |||
cmd += "-p no:doctest " | |||
# ignore package pytest configuration, | |||
# since we aren't running their tests | |||
cmd += "-c _IGNORE_CONFIG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a special value for pytest; pytest has no option I could find to skip loading config files, so this is a filename that probably won't exist, so no config will be found.
It could also be done to put the check-links pytest config in a config file in this package, and use that to override the package's config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think since the config is dynamic we should write out a temporary config file, echo it for debugging, and then use it during each run. This is a reasonable workaround for now, thanks!
Ignore pytest config from pyproject.toml, etc.to avoid conflicts with target package's own pytest config, since we aren't running the package's own tests.
For example, jupyter-server has
addopts = --doctest-modules
, but check-links now has-p no:doctest
, which removes the--doctest-modules
option, causingcheck-links
to fail on jupyter-server with: