Skip to content

Commit d927243

Browse files
fix old driver tests by wrapping imports in a try..except block
1 parent 3845824 commit d927243

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/csp_helpers.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@
1616
from botocore.awsrequest import AWSRequest
1717
from botocore.credentials import Credentials
1818

19-
from snowflake.connector.vendored.requests.exceptions import ConnectTimeout, HTTPError
20-
from snowflake.connector.vendored.requests.models import Response
19+
try:
20+
from snowflake.connector.vendored.requests.exceptions import ConnectTimeout, HTTPError
21+
from snowflake.connector.vendored.requests.models import Response
22+
except ModuleNotFoundError:
23+
# This file gets imported from the old driver tests, which run against a version of the connector
24+
# that doesn't have these modules. Our new tests don't run in that environment, so it's OK to just
25+
# pass on this error.
26+
pass
2127

2228
logger = logging.getLogger(__name__)
2329

0 commit comments

Comments
 (0)