You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/21 19:05:47 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #21022: Fixed tests failing on unittest.skipIf

potiuk commented on a change in pull request #21022:
URL: https://github.com/apache/airflow/pull/21022#discussion_r789924610



##########
File path: tests/providers/apache/hdfs/hooks/test_hdfs.py
##########
@@ -29,9 +31,7 @@
     snakebite_loaded = True
 except ImportError:
     snakebite_loaded = False
-
-if not snakebite_loaded:
-    raise unittest.SkipTest("Skipping test because HDFSHook is not installed")
+    pytestmark = pytest.mark.skip("Skipping test because HDFSHook is not installed")

Review comment:
       Yeah. learn about it today too :)

##########
File path: tests/providers/apache/hdfs/hooks/test_hdfs.py
##########
@@ -29,9 +31,7 @@
     snakebite_loaded = True
 except ImportError:
     snakebite_loaded = False
-
-if not snakebite_loaded:
-    raise unittest.SkipTest("Skipping test because HDFSHook is not installed")
+    pytestmark = pytest.mark.skip("Skipping test because HDFSHook is not installed")

Review comment:
       Yeah. learned about it today 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org