From: "Daniel P. Berrangé" <berrange@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Cleber Rosa" <crosa@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v4 2/4] python: replace avocado tests with pytest
Date: Fri, 27 Feb 2026 08:09:21 +0000 [thread overview]
Message-ID: <aaFQCknP5DRUXS0Z@redhat.com> (raw)
In-Reply-To: <20260226213400.1254014-3-jsnow@redhat.com>
On Thu, Feb 26, 2026 at 04:33:58PM -0500, John Snow wrote:
> Following suit with the rest of this repository, drop avocado and
> replace it with the Python standard "pytest" package.
>
> Our ultimate goal is to merge these python tests with the meson test
> suite, so the use of 'pytest' here is only a stop-gap solution to get
> the GitLab CI 'check-python-tox' passing again following recent Python
> packaging ecosystem changes.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> python/Makefile | 4 +-
> python/setup.cfg | 1 +
> python/tests/linters.py | 79 ++++++++++++++++++++++++++++++++++++++++
> python/tests/minreqs.txt | 1 +
> 4 files changed, 83 insertions(+), 2 deletions(-)
> create mode 100644 python/tests/linters.py
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> +class TestLinters:
> +
> + def test_flake8_pkg(self):
> + check_call([sys.executable, "-m", "flake8", "qemu/"])
> +
> + def test_flake8_scripts(self):
> + check_call([sys.executable, "-m", "flake8", "scripts/"])
> +
> + def test_flake8_qapi(self):
> + check_call([sys.executable, "-m", "flake8",
> + "../scripts/qapi/",
> + "../docs/sphinx/qapidoc.py",
> + "../docs/sphinx/qapi_domain.py"])
Underindented.
> +
> + def test_isort_pkg(self):
> + check_call([sys.executable, "-m", "isort", "-c", "qemu/"])
> +
> + def test_isort_scripts(self):
> + check_call([sys.executable, "-m", "isort", "-c", "scripts/"])
> +
> + def test_isort_qapi(self):
> + check_call([sys.executable, "-m", "isort",
> + "--sp", ".", "-c", "../scripts/qapi/"])
> +
> + def test_isort_qapi_sphinx(self):
> + # Force isort to recognize 'compat' as a local module and not
> + # third-party
> + check_call([sys.executable, "-m", "isort",
> + "--sp", ".", "-c", "-p", "compat",
> + "../docs/sphinx/qapi_domain.py",
> + "../docs/sphinx/qapidoc.py"])
> +
...
> +
> + def test_pylint_qapi(self):
> + os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'
> + check_call([sys.executable, "-m", "pylint",
> + "--rcfile=../scripts/qapi/pylintrc",
> + "../scripts/qapi/",
> + "../docs/sphinx/qapidoc.py",
> + "../docs/sphinx/qapi_domain.py"])
Underindented.
> +
> + def test_pylint_iotests(self):
> + os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'
> + check_call([sys.executable, "-m", "linters", "--pylint"],
> + cwd="../tests/qemu-iotests/")
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-02-27 8:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 21:33 [PATCH v4 0/4] Python: drop avocado, formally support python3.14 John Snow
2026-02-26 21:33 ` [PATCH v4 1/4] python: pin 'wheel' version in minreqs test John Snow
2026-02-26 21:33 ` [PATCH v4 2/4] python: replace avocado tests with pytest John Snow
2026-02-27 8:09 ` Daniel P. Berrangé [this message]
2026-02-27 9:34 ` Thomas Huth
2026-02-26 21:33 ` [PATCH v4 3/4] python: drop avocado John Snow
2026-02-26 21:34 ` [PATCH v4 4/4] python: add formal python3.14 support and testing John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaFQCknP5DRUXS0Z@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=crosa@redhat.com \
--cc=jsnow@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.