approvals / approvals/ApprovalTests.Python

Pytest plugin does not configure reporter

Open
#271 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
212
Forks
56
Avg merge
1m
Merged PRs (30d)
1

Description

I work on windows with a Pixi environement.
If i do not set the reporter at verify call, I get this error:

RuntimeError: This machine has no reporter configuration

Even with --approvaltests-use-reporter:

$ pixi run pytest tests --approvaltests-use-reporter='PythonNative'
===================================================== test session starts =====================================================
platform win32 -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0
rootdir: H:\repo
configfile: pytest.ini
plugins: anyio-4.14.2, approvaltests-19.1.1, approvaltests-0.2.4, cov-7.1.0

Or with environnement variable:

export APPROVAL_TESTS_USE_REPORTER=approvaltests.reporters.diff_tools.ReportWithVisualStudioCode

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in the pytest plugin on Windows with a Pixi environment, first using the verify call without a reporter and then using --approvaltests-use-reporter='PythonNative' or APPROVAL_TESTS_USE_REPORTER. Trace how the plugin reads these settings; done means the configured reporter is used instead of raising the missing reporter configuration error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.