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

DM-11514: Fix some pytest problems #269

Merged
merged 5 commits into from
Aug 8, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ afwdataDir = env.ProductDir("afwdata")
if afwdataDir:
env["ENV"]["AFWDATA_DIR"] = afwdataDir

scripts.BasicSConscript.tests(noBuildList=[name + '.cc' for name in pybind11_test_modules])
scripts.BasicSConscript.tests(noBuildList=[name + '.cc' for name in pybind11_test_modules],
ignoreList=[name + '.py' for name in pybind11_test_modules])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious: why is this change needed? I suppose if you use pytest tests/*.py instead of pytest, as we may have to do initially, that would explain it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed to stop SCons from thinking that the pybind11 .py files are things that should be tested. This is important when we are in a mode where pytest runs each test file separately because pytest exits with bad status if no tests are found. See my comment above replying to @kfindeisen. With these changes pytest without arguments would work but sconsUtils is not yet set up to do that (that's a change we can make later once the basics are done).


env.Clean(targets["tests"], "#testTable.fits")