Taragolis commented on code in PR #28149:
URL: https://github.com/apache/airflow/pull/28149#discussion_r1042595692


##########
tests/providers/amazon/aws/operators/test_datasync.py:
##########
@@ -100,7 +96,7 @@ def setUp(self):
             DestinationLocationArn=self.destination_location_arn,
         )["TaskArn"]
 
-    def tearDown(self):
+    def teardown(self):

Review Comment:
   ```suggestion
       def teardown_method(self):
   ```



##########
tests/providers/amazon/aws/operators/test_datasync.py:
##########
@@ -69,13 +68,9 @@
 
 @mock_datasync
 @mock.patch.object(DataSyncHook, "get_conn")
-class DataSyncTestCaseBase(unittest.TestCase):
-    def __init__(self, *args, **kwargs):
-        super().__init__(*args, **kwargs)
-        self.datasync = None
-
+class DataSyncTestCaseBase:
     # Runs once for each test
-    def setUp(self):
+    def setup(self):

Review Comment:
   I've found that `pytest` actually run methods named  **setup**,  
**teardown**. I don't know might be it some kind of undocumented feature which 
could remove in future releases. So better keep general notation
   
   ```suggestion
       def setup_method(self, method):
   ```



-- 
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]

Reply via email to