Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Release Notes
3.0.0 (unreleased)
------------------

* Group CLI options

* Thanks to `@xmuskrat <https://github.com/xmuskrat>`_ for reporting.

* Switch to Hatch

* Use `pytest.stash` internally instead of `_metadata`
Expand Down
7 changes: 4 additions & 3 deletions src/pytest_metadata/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def include_metadata_in_junit_xml(metadata, pytestconfig, record_testsuite_prope


def pytest_addoption(parser):
parser.addoption(
group = parser.getgroup("pytest-metadata")
group.addoption(
"--metadata",
action="append",
default=[],
Expand All @@ -64,14 +65,14 @@ def pytest_addoption(parser):
nargs=2,
help="additional metadata.",
)
parser.addoption(
group.addoption(
"--metadata-from-json",
action="store",
default="{}",
dest="metadata_from_json",
help="additional metadata from a json string.",
)
parser.addoption(
group.addoption(
"--metadata-from-json-file",
type=str,
dest="metadata_from_json_file",
Expand Down