uranusjr commented on code in PR #41271:
URL: https://github.com/apache/airflow/pull/41271#discussion_r1704924549
##########
tests/operators/test_datetime.py:
##########
@@ -52,30 +51,31 @@ def setup_class(cls):
(datetime.time(10, 0, 0), datetime.datetime(2020, 7, 7, 11, 0, 0)),
]
- def setup_method(self):
- self.dag = DAG(
+ @pytest.fixture(autouse=True)
+ def base_tests_setup(self, dag_maker):
+ self.dag_maker = dag_maker
Review Comment:
I believe we don’t need to do this. Pytest reuses the same fixture objects
during phases, so `dag_maker` in the argument list of a test function is
automatically the same as the `dag_maker` in the fixture.
--
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]