Update documentation to contain start time of test instead of end time
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 38/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- html, python
研究方向
從描述時間欄的使用者文件部分開始,並將其與 issue 中顯示的 pytest hooks 和 HTML 儲存格進行比較。檢查 setup、call 和 teardown 階段是如何表示的,然後更新文件,讓預期的 timestamp 行為明確,並驗證範例仍然準確。
由索引模型根據 Issue 內容生成。
描述
I added a time column as explained in the user documentation but this adds the end timestamp.
The following seems to achieve more what I want. Some feedback would be great and maybe it is worth updating the documentation?
import pytest
from datetime import datetime
def pytest_html_results_table_header(cells):
cells.insert(2, '<th class="sortable time" data-column-type="time">Time</th>')
def pytest_html_results_table_row(report, cells):
start = datetime.fromtimestamp(report.start)
cells.insert(2, f'<td class="col-time">{start}</td>')
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_makereport(item, call):
outcome = yield
report = outcome.get_result()
report.start = call.start
I am still a bit unsure about the different phases of a test like setup, call and teardown. Maybe this needs extra handling?
- 主要語言
- Python
- 星號
- 779
- 分支
- 260
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
pytest-dev/pytest-html 的其他 Issue
-
HTML extras for 'call' and 'teardown' phases get merged可能已有人在做 @contputer0x0 於 4 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 68/100
pytest-dev/pytest-html#1077 ·
-
難度 4/5 3-5 天 新手友好度 42/100
pytest-dev/pytest-html#1039 ·
-
Feature: pluggable HTML themes via Jinja2 template inheritance可能已有人在做 @RonnyPfannschmidt 於 144 天前認領。 未關閉
pytest-dev/pytest-html#1029 · 1 個 reaction · 已指派 1 人 ·
-
難度 3/5 1-2 天 新手友好度 55/100
pytest-dev/pytest-html#1027 ·
-
pytest-html does not escape HTML in testId (v4.2.0)可能已有人在做 @golikovichev 於 128 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 55/100
pytest-dev/pytest-html#1024 ·
查看 pytest-dev/pytest-html 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 72/100
aws-samples/sample-per-model-bedrock#261 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
pwncollege/dojo#1188 ·
維護者通常 1 天內回覆
-
bug launcher packaging
難度 1/5 1 小時以內 新手友好度 88/100
tenstorrent/tt-studio#1426 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
python-attrs/cattrs#796 ·
維護者通常 1 天內回覆