File tree Expand file tree Collapse file tree 5 files changed +28
-121
lines changed Expand file tree Collapse file tree 5 files changed +28
-121
lines changed Original file line number Diff line number Diff line change 59
59
python -m pip install --no-cache-dir --upgrade pip setuptools
60
60
if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
61
61
if [ -f requirements-dev.txt ]; then pip install --no-cache-dir -r requirements-dev.txt; fi
62
- pip list
63
62
64
63
- name : QA checks (ruff-format, ruff-lint, mypy)
65
64
run : |
@@ -106,7 +105,6 @@ jobs:
106
105
python -m pip install --no-cache-dir --upgrade pip setuptools
107
106
if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
108
107
if [ -f requirements-dev.txt ]; then pip install --no-cache-dir -r requirements-dev.txt; fi
109
- pip list
110
108
111
109
- name : Run integration tests
112
110
env : # Test tenant environment variables
Original file line number Diff line number Diff line change 13
13
"pytest-vcr plugin is not installed. Please install pytest-vcr."
14
14
)
15
15
16
- # # Check if vcrpy is installed and ensure the version is 6.0.x
17
- # try:
18
- # vcr_version = pkg_resources.get_distribution("vcrpy").version
19
- # if not vcr_version.startswith("6.0"):
20
- # raise DependencyNotFoundError(
21
- # f"vcrpy version 6.0.x is required, but found {vcr_version}. Please install the correct version."
22
- # )
23
- # except pkg_resources.DistributionNotFound:
24
- # raise DependencyNotFoundError(
25
- # "vcrpy version 6.0.x is not installed. Please install vcrpy version 6.0.x."
26
- # )
16
+ # Check if vcrpy is installed and ensure the version is 6.0.x
17
+ try :
18
+ vcr_version = pkg_resources .get_distribution ("vcrpy" ).version
19
+ if not vcr_version .startswith ("6.0" ):
20
+ raise DependencyNotFoundError (
21
+ f"vcrpy version 6.0.x is required, but found { vcr_version } . Please install the correct version."
22
+ )
23
+ except pkg_resources .DistributionNotFound :
24
+ raise DependencyNotFoundError (
25
+ "vcrpy version 6.0.x is not installed. Please install vcrpy version 6.0.x."
26
+ )
27
27
28
28
import json
29
29
import os
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ pytest~=8.3.4
8
8
pytest-vcr ~= 1.0.2
9
9
# [PINNED] to v6.x since vcrpy>=7.0 requires urllib3>=2.0
10
10
# which breaks compatibility with Python 3.8
11
- # vcrpy~=6.0.2
11
+ vcrpy ~= 6.0.2
12
12
pytest-order ~= 1.3.0
13
13
pytest-timer [termcolor ]~= 1.0.0
14
14
pytest-sugar ~= 1.0.0
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -31,3 +31,19 @@ def mock_custom_metadata_cache():
31
31
def mock_tag_cache ():
32
32
with patch ("pyatlan.cache.atlan_tag_cache.AtlanTagCache" ) as cache :
33
33
yield cache
34
+
35
+
36
+ @pytest .fixture (autouse = True )
37
+ def patch_vcr_http_response_version_string ():
38
+ """
39
+ Patch the VCRHTTPResponse class to add a version_string attribute if it doesn't exist.
40
+
41
+ This patch is necessary to avoid bumping vcrpy to 7.0.0,
42
+ which drops support for Python 3.8.
43
+ """
44
+ from vcr .stubs import VCRHTTPResponse # type: ignore[import-untyped]
45
+
46
+ if not hasattr (VCRHTTPResponse , "version_string" ):
47
+ VCRHTTPResponse .version_string = None
48
+
49
+ yield
You can’t perform that action at this time.
0 commit comments