astropy / astropy/pytest-arraydiff
pytest-arraydiff giving problems when running pytests coverage module
- 主要语言
- Python
- 星标
- 27
- 派生
- 21
- 平均合并
- 6 小时 39 分钟
- 30 天内合并 PR
- 1
描述
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?
贡献指南
这个仓库没有索引到贡献指南
调研方向
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.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100