commit:     720d733e76768a6b0afaf65a602427247f9257b4
Author:     David Palao <david.palao <AT> gmail <DOT> com>
AuthorDate: Mon Oct 30 15:01:43 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 11 02:55:29 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=720d733e

pyproject.toml, NEWS: declare pytest markers.

Declare pytest markers. They can be used to select what tests
(not) to run, e.g.:

  pytest -m ft  # to select tests marked with"ft"
  pytest -m "not ft"  # to skip tests marked with "ft"

to list the markers:

  pytest --markers

Signed-off-by: David Palao <david.palao <AT> gmail.com>
Closes: https://github.com/gentoo/portage/pull/1170
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS           | 3 +++
 pyproject.toml | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/NEWS b/NEWS
index 362266369f..f1305744fb 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,9 @@ Features:
 Bug fixes:
 * ebuild: Add missing newlines in error messages.
 
+Cleanups:
+* Add pytest markers: ft, unit and stress.
+
 portage-3.0.55 (2023-11-06)
 --------------
 

diff --git a/pyproject.toml b/pyproject.toml
index eb725e1c54..4ba455525f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -33,3 +33,10 @@ gpkg-sign = 'portage.util.bin_entry_point:bin_entry_point'
 portageq = 'portage.util.bin_entry_point:bin_entry_point'
 quickpkg = 'portage.util.bin_entry_point:bin_entry_point'
 regenworld = 'portage.util.bin_entry_point:bin_entry_point'
+
+[tool.pytest.ini_options]
+markers = [
+    "ft: functional tests (select: '-m ft'; deselect with '-m \"not ft\"')",
+    "stress: stress tests (select: '-m stress'; deselect with '-m \"not 
stress\"')",
+    "unit: unit tests (select: '-m unit'; deselect with '-m \"not unit\"')",
+]

Reply via email to