pytest-arraydiff giving problems when running pytests coverage module

未關閉
#20 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

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

研究方向

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

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

描述

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?

主要語言
Python
星號
27
分支
21
平均合併
6 小時 39 分鐘
30 天內合併 PR
1

貢獻指南

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

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

astropy/pytest-arraydiff 的其他 Issue

查看 astropy/pytest-arraydiff 的全部 Issue

相似的 Issue

更多 Python Issue

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

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