This is an automated email from the ASF dual-hosted git repository.

spolavarapu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 97847b6  RANGER-3190: Skip Python unit tests if requests not present
97847b6 is described below

commit 97847b62c3a906414c7f89c23f41c78ceb8f6994
Author: Abhishek Kumar <abhishekkumar100...@gmail.com>
AuthorDate: Wed Feb 24 20:55:49 2021 -0500

    RANGER-3190: Skip Python unit tests if requests not present
    
    Signed-off-by: Sailaja Polavarapu <spolavar...@cloudera.com>
---
 intg/src/test/python/test_ranger_client.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/intg/src/test/python/test_ranger_client.py 
b/intg/src/test/python/test_ranger_client.py
index a330683..cbedcbf 100644
--- a/intg/src/test/python/test_ranger_client.py
+++ b/intg/src/test/python/test_ranger_client.py
@@ -21,7 +21,11 @@ import unittest
 from unittest.mock                      import patch
 from apache_ranger.exceptions           import RangerServiceException
 from apache_ranger.model.ranger_service import RangerService
-from apache_ranger.client.ranger_client import API, HttpMethod, HTTPStatus, 
RangerClient
+
+try:
+    from apache_ranger.client.ranger_client import API, HttpMethod, 
HTTPStatus, RangerClient
+except ModuleNotFoundError: # requests not installed
+    exit() # skipping unit tests
 
 
 class MockResponse:

Reply via email to