astropy / astropy/pytest-arraydiff

pytest-arraydiff giving problems when running pytests coverage module

未關閉
#20 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
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?

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先,使用 test_file_name.py::test_name、--cov-report html、--cov=. 和 --arraydiff 重現該命令。將其與正常運作的 pytest --arraydiff 呼叫進行比較,並檢查 test_cliff_erosion_equations.py::test_main;完成表示要確認 coverage 是否會改變參考檔案的查找,並記錄或修正該行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
testing
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。