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
[BEAM-3713] Add pytest testing infrastructure #7949
Conversation
run seed job |
run python precommit_pytest |
650f78f
to
a76ec7f
Compare
run seed job |
a76ec7f
to
6fe353e
Compare
run seed job |
5137e56
to
e30e8b8
Compare
run seed job |
e30e8b8
to
33dde25
Compare
run seed job |
run python precommit_pytest |
1 similar comment
run python precommit_pytest |
run python_pytest precommit |
33dde25
to
2706735
Compare
run seed job |
run python_pytest precommit |
@@ -201,6 +202,7 @@ def run(self): | |||
install_requires=REQUIRED_PACKAGES, | |||
python_requires=python_requires, | |||
test_suite='nose.collector', |
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.
we probably can also use pytest 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.
I don't know what to put here for pytest. The instructions said to add the setup_requires
line below.
Thank you for initiating this work! I have this nose to pytest thought long time ago, but the main reason to push my back is that python framework deeply integrated with nose. Except
|
2706735
to
2c94f4c
Compare
run seed job |
1 similar comment
run seed job |
run python precommit |
run python_pytest precommit |
2c94f4c
to
8c1fc1a
Compare
run python_pytest precommit |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
still working on this |
[testenv:py36] | ||
setenv = | ||
RUN_SKIPPED_PY3_TESTS=0 | ||
commands = | ||
python apache_beam/examples/complete/autocomplete_test.py | ||
python setup.py nosetests | ||
|
||
[testenv:py36-pytest] | ||
setenv = |
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.
From @robertwb on #9592:
We should probably be using https://tox.readthedocs.io/en/latest/example/basic.html#compressing-dependency-matrix to avoid these kinds of omissions.
This is a temporary solution while waiting for full solution in apache#7949
This is apache#7949 without IT support. - Runs unit tests using pytest - tox: `tox -e py27-gcp-pytest,py36-pytest,etc.` - gradle: `../../gradlew pythonPreCommitPytest` - github PR phrase: `run python_pytest precommit` - Tests run in parallel (still single-threaded but on multiple worker processes). - no_xdist marker used for tests that don't work the xdist plugin. - Allows specifying test module in tox cmd line. Example: ```sh tox -e py27-pytest apache_beam.transforms.window_test ```
This is apache#7949 without IT support. - Runs unit tests using pytest - tox: `tox -e py27-gcp-pytest,py36-pytest,etc.` - gradle: `../../gradlew pythonPreCommitPytest` - github PR phrase: `run python_pytest precommit` - Tests run in parallel (still single-threaded but on multiple worker processes). - no_xdist marker used for tests that don't work the xdist plugin. - Allows specifying test module in tox cmd line. Example: ```sh tox -e py27-pytest apache_beam.transforms.window_test ```
This is #7949 without IT support. - Runs unit tests using pytest - tox: `tox -e py27-gcp-pytest,py36-pytest,etc.` - gradle: `../../gradlew pythonPreCommitPytest` - github PR phrase: `run python_pytest precommit` - Tests run in parallel (still single-threaded but on multiple worker processes). - no_xdist marker used for tests that don't work the xdist plugin. - Allows specifying test module in tox cmd line. Example: ```sh tox -e py27-pytest apache_beam.transforms.window_test ```
This is apache#7949 without IT support. - Runs unit tests using pytest - tox: `tox -e py27-gcp-pytest,py36-pytest,etc.` - gradle: `../../gradlew pythonPreCommitPytest` - github PR phrase: `run python_pytest precommit` - Tests run in parallel (still single-threaded but on multiple worker processes). - no_xdist marker used for tests that don't work the xdist plugin. - Allows specifying test module in tox cmd line. Example: ```sh tox -e py27-pytest apache_beam.transforms.window_test ```
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
still working on this |
Is this still being worked on? |
Picking this up again |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
I haven't had time to work on this, but it's still relevant. |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
bump |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
Initial step towards migrating off of nosetests.
tox -e py27-gcp-pytest,py36-pytest,etc.
@pytest.mark.{pre,post}commit
replaces@attr('IT')
tests that don't pass on certain runners.
invocation), using multiple XML outputs.
Still needs:
on pytest.
Nice to have:
pytest plugins used for this.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.Post-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.