zhongjiajie commented on a change in pull request #5448: [AIRFLOW-4827] Remove 
compatible test for python 2
URL: https://github.com/apache/airflow/pull/5448#discussion_r296072633
 
 

 ##########
 File path: tests/hooks/test_hive_hook.py
 ##########
 @@ -460,23 +458,7 @@ def test_get_results_data(self):
         results = hook.get_results(query, schema=self.database)
         self.assertListEqual(results['data'], [(1, 1), (2, 2)])
 
-    @unittest.skipIf(NOT_ASSERTLOGS_VERSION < 3.4, 'assertLogs not support 
before python 3.4')
-    def test_to_csv_assertlogs(self):
-        hook = HiveServer2Hook()
-        query = "SELECT * FROM {}".format(self.table)
-        csv_filepath = 'query_results.csv'
-        with self.assertLogs() as cm:
-            hook.to_csv(query, csv_filepath, schema=self.database,
-                        delimiter=',', lineterminator='\n', 
output_header=True, fetch_size=2)
-            df = pd.read_csv(csv_filepath, sep=',')
-            self.assertListEqual(df.columns.tolist(), self.columns)
-            self.assertListEqual(df[self.columns[0]].values.tolist(), [1, 2])
-            self.assertEqual(len(df), 2)
-            self.assertIn('INFO:airflow.hooks.hive_hooks.HiveServer2Hook:'
-                          'Written 2 rows so far.', cm.output)
-
-    @unittest.skipIf(NOT_ASSERTLOGS_VERSION >= 3.4, 'test could cover by 
test_to_csv_assertLogs')
-    def test_to_csv_without_assertlogs(self):
 
 Review comment:
   You right, a wrong remove

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to