-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Pytest and CI #198
Pytest and CI #198
Conversation
Those removed correspond to those which failed alredy running the old test suit.
Looks good 👍 . What we could do it merge this into a separate branch, iron out the bugs there first, and then merge it into master which will stop the false negatives for other pull requests while we work on this. |
@matsjoyce As it is right now it should not generate false negatives (the bugs are just with the changes I have locally in my computer), so maybe it could directly be merged to master as a step forward? Even if it stays like this forever (thinking about the worst case, in which we can not deal with the bugs when adapting the rest of the files), I think it is better this way. What you think? |
Getting CI can only be a good thing unless it generates tons of spam, which travis shouldn't. I think we should merge ASAP, but it's not my call. |
@mmckerns Thanks for considering this pull request. It has few differences with respect to #191:
|
@Peque: Yes, I see the differences -- but thanks for itemizing them in a compact way. |
I'm going to start with the PR in #191. I like a lot of what is in your PR, and I think a lot of it should be used in |
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.
don't move check
from dill
to test_check
. Otherwise, the change to test_check
looks good.
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 change makes pytest
required to run the tests. I'd rather not do that. Otherwise, the changes to test_file
are fine.
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.
ultimately I think your tox.ini
and travis.yml
are a better option than PR #191, and is a fine start for adding tox
and pytest
support. I also see the test failures with pytest
and need to better understand why. I'll come back to approving your tox.ini
and travis.yml
later.
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.
Why run with pytest
at all if you are going to run the tests with bash
?
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.
dill
works for 2.6-2.7 and 3.1-3.6 and pypy and pypy3, with some minor errors (as seen in test suites). Do you mean "unsupported" by there is a single test failure, or otherwise?
@Peque: can you move the conflicting |
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.
See comments and change requests in the comments above.
@mmckerns Thanks for taking the time to review the changes. Next time, if you can, add your comments associated to the specific changes (i.e.: line of code or file), because that way it is easier for me to know to which code part you are referring to (I think you just clicked on the pull request's "global" Review Changes button).
Ok, just thought it was really a test-only function, which didn't make sense as actual dill code.
I understand you would want, at first, to avoid that. However,
If you like tox, I can easily create a pull request for that only. I think it is a good change anyway. It allows you to run all the tests using multiple interpreters locally (then we can discuss adding the
Bash runs only old tests (new modified tests do not run any code when executed with
I think adding
If you agree, as I have mentioned, we could start by simply integrating |
@Peque: yeah sorry about the dissociated comments, I was trying something new and it didn't work as I expected. |
@mmckerns Notice that, when you hover your mouse on the code (on the "Files Changes" tab of the pull request), there is a |
Yes, I know… but bear with me. I'm going to use I would love to use
Aha, I didn't register that you had deleted the
The tests pass locally for 3.5 and 3.6, with the exception of one test (namedtuple) in |
thanks |
This pull request implements initial
pytest
compatibility and CI with Travis. See the results after setting up the repository with Travis.Tests are executed with
tox
, meaning that the user can very easily reproduce all test cases (with different Python interpreters) locally and easily.tox
callspytest
to run those test files that have been adapted. Then, the rest of the files, are tested as before (simply executing the test file with the interpreter).It is a step forward to CI and
pytest
integration. Although it is not complete, I think it could be merged as-is (I don't see any downsides).Locally, I have already adapted most of the test files to be
pytest
compatible. However, they all fail at least at one point. Therefore, I would need more time to fix them and, probably, discuss them with you @mmckerns to understand what the test is doing and why is now failing.Any comments/suggestions?