diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-06-30 13:17:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 11:17:40 -0600 |
commit | 66e114a660c53400e389f119781f378311b65108 (patch) | |
tree | 7d0c3ca519f0e245288a9fb9d51a899d8f67cea0 /HACKING.rst | |
parent | baf11418c196ca72e6d570b64051d8ed35065abb (diff) | |
download | vyos-cloud-init-66e114a660c53400e389f119781f378311b65108.tar.gz vyos-cloud-init-66e114a660c53400e389f119781f378311b65108.zip |
Enable use of the caplog fixture in pytest tests, and add a cc_final_message test using it (#461)
caplog is only available in pytest itself from 3.0 onwards. In xenial, we only have pytest 2.8.7. However, in xenial we do have pytest-catchlog available (as python3-pytest-catchlog), so we use that where appropriate.
Diffstat (limited to 'HACKING.rst')
-rw-r--r-- | HACKING.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/HACKING.rst b/HACKING.rst index 1e8aca7a..27a38bc3 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -218,11 +218,12 @@ The following guidelines should be followed: [#fixture-list]_: * ``cache`` - * ``capsys`` * ``capfd`` - * ``record_xml_property`` + * ``caplog`` (provided by ``python3-pytest-catchlog`` on xenial) + * ``capsys`` * ``monkeypatch`` * ``pytestconfig`` + * ``record_xml_property`` * ``recwarn`` * ``tmpdir_factory`` * ``tmpdir`` @@ -328,9 +329,9 @@ variable annotations specified in `PEP-526`_ were introduced in Python .. [#fixture-list] This list of fixtures (with markup) can be reproduced by running:: - py.test-3 --fixtures -q | grep "^[^ ]" | grep -v no | sed 's/.*/* ``\0``/' + py.test-3 --fixtures -q | grep "^[^ -]" | grep -v '\(no\|capturelog\)' | sort | sed 's/.*/* ``\0``/' - in a xenial lxd container with python3-pytest installed. + in a xenial lxd container with python3-pytest-catchlog installed. Feature Flags ------------- |