File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959 python -m pip install --no-cache-dir --upgrade pip setuptools
6060 if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
6161 if [ -f requirements-dev.txt ]; then pip install --no-cache-dir -r requirements-dev.txt; fi
62- pip list
6362
6463 - name : QA checks (ruff-format, ruff-lint, mypy)
6564 run : |
@@ -106,7 +105,6 @@ jobs:
106105 python -m pip install --no-cache-dir --upgrade pip setuptools
107106 if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
108107 if [ -f requirements-dev.txt ]; then pip install --no-cache-dir -r requirements-dev.txt; fi
109- pip list
110108
111109 - name : Run integration tests
112110 env : # Test tenant environment variables
Original file line number Diff line number Diff line change 1313 "pytest-vcr plugin is not installed. Please install pytest-vcr."
1414 )
1515
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+ )
2727
2828import json
2929import os
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ pytest~=8.3.4
88pytest-vcr ~= 1.0.2
99# [PINNED] to v6.x since vcrpy>=7.0 requires urllib3>=2.0
1010# which breaks compatibility with Python 3.8
11- # vcrpy~=6.0.2
11+ vcrpy ~= 6.0.2
1212pytest-order ~= 1.3.0
1313pytest-timer [termcolor ]~= 1.0.0
1414pytest-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():
3131def mock_tag_cache ():
3232 with patch ("pyatlan.cache.atlan_tag_cache.AtlanTagCache" ) as cache :
3333 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