On 22. 5. 26 12:27, Branko Čibej wrote:
On 22. 5. 26 11:50, [email protected] wrote:
Author: brane
Date: Fri May 22 09:50:14 2026
New Revision: 1934497
Log:
Allow the tests to work with a non-standart Python 3 installation that
does not provide the 'venv' module.
This commit addresses some of Ivan's concerns.
1. The 'venv' module isn't available
'venv' is part of the Python standard library, so strictly speaking,
it should always be available to the tests. But it's no big deal to
make it conditional. If it's not present, the test driver won't
attempt to create a virtual environment or download any dependencies.
2. Dependency version pinning
Done. Not doing that from the start was an omission on my part.
3. Do not download stuff / allow offline testing
This has always been possible, either by installing the optional
dependencies (lxml and rnc2rng), or by telling the test runner that
its --python-venv=/somewhere/that/does/not/exist. In either case, the
test runner won't try to download anything.
The open question now is: what should be the default. IMO we should
always do our best to validate our XML output, and if that means
downloading lxml & co., then so be it. It's the preferred
configuration for developer and CI testing, and there are three ways
to avoid those downloads. May the mayhem discussion begin.
It has also always been the case that if those two modules aren't
available, we won't validate the XML output against the schema. It
turns out that we had two additional issues:
* two of the log tests that were marked @Xfail() for other reasons
actually succeed now, but they write invalid XML;
* the predicate that checks if we're validating XML was not doing
what it said on the tin.
I fixed the predicate and updated the annotations on those two tests.
However, when testing over DAV, one of those two tests returns valid
XML... so I'll have to tweak that XFail predicate some more.
Fixed the test case predicate in r1934500 and proposed both commits for
backport to 1.15.
-- Brane