-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Move Python test suite #1354
Move Python test suite #1354
Conversation
033e823
to
812c37b
Compare
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.
Thanks for making these changes, @ischoegl. I was pleased to see that this change fixes an issue I had been experiencing, where pytest's fancy introspection didn't work and wasn't able to show the values of the arguments of assert X == Y
when the assertion failed.
I have two suggestions. First, if you add a test/python/pytest.ini
file with the contents
[pytest]
pythonpath = ../../build/python
you will be able to run pytest test/python
and variants directly from the root of the repository, without needing to set the PYTHONPATH
(or accidentally running the tests from a previously-installed copy of Cantera). I also found that this let me set up integration with VS Code, which I think will be really nice to use.
Second, I'd like to suggest squashing some of the commits here that are not logically separate. For example, moving the test suite and fixing the integration with SCons. Changes like could lead to annoying errors while using git bisect
in the future, where trying to run the tests with this intermediate commit just doesn't work. I think the same concern may be applicable to some of the commits in #1352.
812c37b
to
f470862
Compare
@speth ... thank you for the review. Especially your comment about
works after removing previous installs via Per suggestion, I also squashed commits - thus far, when committing, I was usually more concerned about keeping steps separate so I can trace back easily, but your point about |
f470862
to
8b93b1a
Compare
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.
Checking out just the first commit here does not build, with the error:
scons: *** [build/python/dist/Cantera-3.0.0a2-cp310-cp310-macosx_11_0_arm64.whl] Explicit dependency `build/python/cantera/test/README.txt' not found, needed by target `build/python/dist/Cantera-3.0.0a2-cp310-cp310-macosx_11_0_arm64.whl'.
And as expected, running scons test
with just the first two commits results in a bunch of pollution in the test/data
directory.
So I'd like to suggest squashing at least the first of those commits, and possibly the second as well.
8b93b1a
to
1b901ae
Compare
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.
Thanks, @ischoegl. I think this is good to go.
Due to moving tests from interfaces/cython/cantera/test to test/python in Cantera#1354, the relative path to the test/work/python directory has changed.
Due to moving tests from interfaces/cython/cantera/test to test/python in Cantera#1354, the relative path to the test/work/python directory has changed.
Due to moving tests from interfaces/cython/cantera/test to test/python in Cantera#1354, the relative path to the test/work/python directory has changed.
Due to moving tests from interfaces/cython/cantera/test to test/python in Cantera#1354, the relative path to the test/work/python directory has changed.
Due to moving tests from interfaces/cython/cantera/test to test/python in #1354, the relative path to the test/work/python directory has changed.
Changes proposed in this pull request
test_convert.py::yaml2ckTest
to work folderIf applicable, fill in the issue number this pull request is fixing
Closes #1258
If applicable, provide an example illustrating new features this pull request is introducing
After the proposed changes
just works.
Checklist
scons build
&scons test
) and unit tests address code coverage