Use plain asserts in tests.#12951
Conversation
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
|
The Workflow run is cancelling this PR. Building image for the PR has been cancelled |
|
Thanks @jmcarp for the PR!
We've reached consensus that we prefer |
4acf381 to
65f45d3
Compare
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
9f6acb8 to
5283851
Compare
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
9831e7c to
8a9689a
Compare
|
The failed test is https://github.com/apache/airflow/pull/12951/checks?check_run_id=1675678142#step:6:890 - looking at it, I think it either should be moved to quarantine or fixed. |
3e0c0f2 to
faeb5ea
Compare
|
I'm marking that test as quarantined. It passes locally, and behavior seems inconsistent from CI. |
faeb5ea to
70425ad
Compare
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
|
The Workflow run is cancelling this PR. Building image for the PR has been cancelled |
301b293 to
093ec51
Compare
|
Rebased. The last failing tests I saw seemed random and unrelated to these changes. |
093ec51 to
0bc7b2f
Compare
|
There's an error which seems to be present in multiple builds, so I think we should take a look at that: |
5642146 to
b7df0c9
Compare
|
The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason. |
5b77ef0 to
e6cc6dd
Compare
|
Hey @jmcarp -> I had to cancel this run because of this random GitHub error https://github.com/apache/airflow/runs/1699834461?check_suite_focus=true#step:10:310 Can you please --amend/push again? BTW. We have a meeting today with INFRA and GitHub developer advocate https://cwiki.apache.org/confluence/display/INFRA/ASF+Builds+Agenda+2021-01-14, as this is releted to erratic behaviour of Github Registry |
e6cc6dd to
69f6cfa
Compare
|
The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason. |
|
The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason. |
|
The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason. |
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
|
Ok, I think tests are in good shape and the failures are random (quarantined tests) or a formatting regression in setup.cfg that's already in the master branch. |
|
Yeah. There Was an extra space (!) added in setup.cfg but it has been fixed since :) |
|
Thanks for your patience @jmcarp! :) The CI problems did not make it easier. |
We have talked about switching from unittest-style assertions (like
self.assertEqual(foo, bar)) to plain pytest-style assertions (likeassert foo == bar) on slack and the mailing list, but it doesn't seem like we've decided so far. I wanted to send a sample PR to show how this might work. I generated these changes with a one-line command:If we try to refactor many tests at once, we'll likely run into conflicts, but because we can auto-refactor the code easily, fixing conflicts should be straightforward too.
Note that I didn't use the
remove_classfixer or move test setup into fixtures--this just concerns assertion style.Does this seem like an improvement? If so, we can refactor tests module by module, or run
unittest2pyteston all the tests at once.cc @ashb @potiuk