-
Notifications
You must be signed in to change notification settings - Fork 723
Revamp testing workflow and use pytest
instead of unittest
#6889
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
Revamp testing workflow and use pytest
instead of unittest
#6889
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Looks nice, thanks for this! Aside from comments, one question: everywhere there is an e2e
pytest mark there is a slow
mark. Can we just get rid of the slow
mark since it is redundant here?
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.
Looks good. Thanks for this 🚀
pytest
pytest
instead of unittest
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 updating the bazel version. I think we should get rid of tfx_test_installed.sh
. What do you think?
I agree in concept. My only hesitation is that it might break something internal for Google. That said, if we are disconnecting from Google's infrastructure (which we are), then this won't break anything and it is not needed |
c5eee4b
to
bcfc527
Compare
Now that I've rebased to include linting, I need to fix linting errors. |
Thanks for doing the work!
Could you add some feature to skip the failing tests in this moment to fix it later if everything is settled? And please tag me so that I can keep track of it. Thanks. |
629d857
to
66384fb
Compare
Changes have been made
@lego0901 @roseayeon All checks currently pass and the PR is ready for review and merge. All failing tests have been given |
03de455
to
7b504b6
Compare
Hi @smokestacklightnin sorry for the late reply. Could you point me out where the list of the skipped tests is so that we can handle it later? Thanks! |
Hi @lego0901, no problem at all. To see which tests have $ grep "pytest.mark.xfail" -r tfx/ |
@lego0901 FYI, per the request in the Google/Quansight meeting today (Wednesday), I have added tests for both nightly and default constraints. As I am writing this comment, I am waiting for the tests to pass, and once they do, I believe this PR is ready for merge, provided it passes your review. |
Rename class because it is not a test Rename class because it is not a test Rename function because it is not a test
0a15b28
to
29adb58
Compare
Here is a summary of what is included in this PR:
-m "not e2e"
flagif __name__ == "__main__"
section from tests because it is not necessary, or even run, when using pytest. Nontrivial functionality from those sections was preserved.pytest_runner
from dependenciesCONTRIBUTING.md
to reflect all changesenable_v2_behavior
from tests that previously called it because tensorflow v2 is what is currently used.xfail
marks to classes and methods that have failing tests