potiuk commented on a change in pull request #19860:
URL: https://github.com/apache/airflow/pull/19860#discussion_r765755366
##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -111,24 +112,32 @@ def clean_db():
# The tests expect DAGs to be fully loaded here via setUpClass method
below
@pytest.fixture(autouse=True)
- def set_instance_attrs(self, dagbag):
- self.dagbag = dagbag
+ def per_test(self) -> Generator:
self.clean_db()
self.scheduler_job = None
+
Review comment:
Here I noticed that the fixtures were partially duplicated (clean_db and
scheduler_job cleanup was repeated in the "set_instance_attrs" fixture for some
reason) and also they were a bit "assymetrical" - When I do fixtures like this
I try to make sure what is usually introduced before yield is "cleaned-up" in
reverse orther after yield. Now both fixtures have no repetitive code and they
exhibit this "symmetry"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]