Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #33521: doctesting with pytest fails on system install of sage
pytest assumes the directory containing the code to be tested is writable. This is not currently the case on sage-on-distro were most of the time testing is done after installing on the system. Here is a typical result {{{ ============================= test session starts ============================== platform linux -- Python 3.10.2, pytest-7.0.1, pluggy-1.0.0 rootdir: /usr plugins: hypothesis-6.38.0 collected 0 items =============================== warnings summary =============================== ../../usr/lib/python3.10/site-packages/_pytest/cacheprovider.py:433 /usr/lib/python3.10/site-packages/_pytest/cacheprovider.py:433: PytestCacheWarning: could not create cache path /usr/.pytest_cache/v/cache/nodeids config.cache.set("cache/nodeids", sorted(self.cached_nodeids)) ../../usr/lib/python3.10/site-packages/_pytest/stepwise.py:52 /usr/lib/python3.10/site-packages/_pytest/stepwise.py:52: PytestCacheWarning: could not create cache path /usr/.pytest_cache/v/cache/stepwise session.config.cache.set(STEPWISE_CACHE_DIR, []) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html }}} pytest can be started with some option to change the location of the cache directory `-o cache_dir=...`. pytest is currently called from `sage-runtest` and this is where we may want to apply any changes. URL: https://trac.sagemath.org/33521 Reported by: fbissey Ticket author(s): Matthias Koeppe Reviewer(s): François Bissey
- Loading branch information