Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

pytest-arraydiff giving problems when running pytests coverage module

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
testing

Research direction

Start by reproducing the command with test_file_name.py::test_name, --cov-report html, --cov=., and --arraydiff. Compare it with the working pytest --arraydiff invocation and inspect test_cliff_erosion_equations.py::test_main; done means identifying whether coverage changes reference-file lookup and documenting or fixing the behavior.

Written by the indexing model from the issue text.

Description

bug

I am using the pytest-arraydiff package to test some functions which return arrays. For the tests in question I am using the following decorator:

@pytest.mark.array_compare(file_format='text')

I have used the following command to generate test files:

pytest --arraydiff-generate-path=test_data

Which generated some test files for me such that when I run:

pytest --arraydiff

My test suite runs successfully. Unfortunately I also need to run a coverage check, but running the following command:

pytest --cov-report html test_file_name.py::test_name --cov=. --arraydiff

Results in an error:

FAILED test_cliff_erosion_equations.py::test_main - Exception: File
not found for comparison test

Is pytest-arraydiff not compatible with pytest's coverage module? If not, how else can I test out functions which return arrays? what is the common practice here?

Dominant language
Python
Stars
27
Forks
21
Avg merge
6h 39m
Merged PRs (30d)
1

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.

More from astropy/pytest-arraydiff

All issues in astropy/pytest-arraydiff

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.