ashb commented on a change in pull request #8637:
URL: https://github.com/apache/airflow/pull/8637#discussion_r418391929



##########
File path: tests/test_configuration.py
##########
@@ -440,33 +441,42 @@ def make_config():
             # lookup even if we remove this explicit fallback
             test_conf.deprecated_values = {
                 'core': {
-                    'task_runner': ('BashTaskRunner', 'StandardTaskRunner', 
'2.0'),
+                    'task_runner': (re.compile(r'\ABashTaskRunner\Z'), 
r'StandardTaskRunner', '2.0'),
+                    'hostname_callable': (re.compile(r':'), r'.', '2.0'),
                 },
             }
             test_conf.read_dict({
                 'core': {
                     'executor': 'SequentialExecutor',
                     'task_runner': 'BashTaskRunner',
                     'sql_alchemy_conn': 'sqlite://',
+                    'hostname_callable': 'socket:getfqdn',
                 },
             })
             return test_conf
 
         with self.assertWarns(FutureWarning):
             test_conf = make_config()
             self.assertEqual(test_conf.get('core', 'task_runner'), 
'StandardTaskRunner')
+            self.assertEqual(test_conf.get('core', 'hostname_callable'), 
'socket.getfqdn')
 
         with self.assertWarns(FutureWarning):
             with unittest.mock.patch.dict('os.environ', 
AIRFLOW__CORE__TASK_RUNNER='BashTaskRunner'):
                 test_conf = make_config()
 
                 self.assertEqual(test_conf.get('core', 'task_runner'), 
'StandardTaskRunner')
+

Review comment:
       ```suggestion
   
   with self.assertWarns(FutureWarning):
   ```
   
   We should have a separate context manager/check for each instance too




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


Reply via email to