2021-04-23 18:21:14 +02:00
|
|
|
---
|
2022-05-05 12:40:05 +02:00
|
|
|
tests/conftest.py | 13 ++-----------
|
|
|
|
1 file changed, 2 insertions(+), 11 deletions(-)
|
2021-04-23 18:21:14 +02:00
|
|
|
|
|
|
|
--- a/tests/conftest.py
|
|
|
|
+++ b/tests/conftest.py
|
2022-05-05 12:40:05 +02:00
|
|
|
@@ -18,17 +18,8 @@ collect_ignore = ["roots"]
|
2021-04-23 18:21:14 +02:00
|
|
|
|
2022-05-05 12:40:05 +02:00
|
|
|
@pytest.fixture(scope="session")
|
|
|
|
def inv(pytestconfig: Config) -> Inventory:
|
|
|
|
- cache_path = f"python{sys.version_info.major}.{sys.version_info.minor}/objects.inv"
|
|
|
|
- assert pytestconfig.cache is not None
|
2021-04-23 18:21:14 +02:00
|
|
|
- inv_dict = pytestconfig.cache.get(cache_path, None)
|
|
|
|
- if inv_dict is not None:
|
|
|
|
- return Inventory(inv_dict)
|
|
|
|
-
|
|
|
|
- print("Downloading objects.inv")
|
2022-05-05 12:40:05 +02:00
|
|
|
- url = "https://docs.python.org/{v.major}.{v.minor}/objects.inv".format(v=sys.version_info)
|
2021-04-23 18:21:14 +02:00
|
|
|
- inv = Inventory(url=url)
|
|
|
|
- pytestconfig.cache.set(cache_path, inv.json_dict())
|
|
|
|
- return inv
|
|
|
|
+ inv_dict = '/usr/share/doc/packages/python@PYTHON_VERSION@/html/objects.inv'
|
|
|
|
+ return Inventory(inv_dict)
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|