The GitHub Actions job "Tests" on airflow.git has succeeded.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
c6594480e2722513fd082a6c65e30e2504698ba2 / Jarek Potiuk <[email protected]>
Replace cassandra hack with fixture to fail badly named test files (#32626)

The cassandra hack added in #30315 does not seem to have a chance to get
away. Neither Pytest https://github.com/pytest-dev/pytest/issues/10844
nor Datastax https://github.com/datastax/python-driver/pull/1142
want to own the problem for now (though there is a proposal from
pytest contributors on how Datastax could refactor their code to
avoid the problem)

However during the discussion an idea popped in my head on how
we could come back to test_* pattern with far less probability of
missing some tests that are added to wrong files. Seems that we
can add a fixture that will outright fail tests if they are
placed if files not following the test_* pattern. While it would
not help in case test would be wrongly named in the first place,
it would definitely help to not to add more tests in wrongly named
files because it will be literally impossible to run the tests
added in a wrong file, even if you manualy do `pytest somefile.py`
and avoid running collection.

I also did a quick check to try to find cases where the test_*
file name was already violated and I found (and renamed) two that
I have found. It seems it is quite likely that similar mistake
could be done in the future - but with the fixture I added it
should be far less likely someone adds tests in a wrongly named
file.

Report URL: https://github.com/apache/airflow/actions/runs/5564160070

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to