Repository navigation
TST: skip a docstring-focused test when running in Python's optimized mode - #17478
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
What is the purpose of the change here? If you are running the tests at an optimization level that discards docstrings then you are also running at an optimization level that discards |
mhvk
left a comment
There was a problem hiding this comment.
I guess this means the docstring creation itself was secure against optimization? That's nice to know!
|
@eerovaher - |
yes. I'm only addressing actual issues that I discover while actually running pytest with |
|
I can't run the tests with optimizations at all (with |
|
yes, one also needs to ignore this specific warning in pytest's configuration, which is annoying to do since you also have to know what builtin warning type diff --git a/pyproject.toml b/pyproject.toml
index b2dea87895..985b3ef455 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -221,6 +221,7 @@ filterwarnings = [
"error",
"ignore:unclosed <socket:ResourceWarning",
"ignore:unclosed <ssl.SSLSocket:ResourceWarning",
+ "ignore:assertions not in test modules or plugins will be ignored:UserWarning"
]
doctest_norecursedirs = [
"*/setup_package.py", |
Description
ref #17472