fixtures do not record dependencies on other fixtures
まだ誰も着手していません。
評価
調査の方向性
Start in the allure-pytest listener's pytest_fixture_setup handling, where each fixture becomes a before entry in a container JSON file; the fixturedef handed to that hook exposes the fixture's argument names, which is exactly the dependency data missing from the output. Run the snippet from the issue to generate the allure/*.json files and confirm where the ordering information is lost. Check whether the shared Allure results schema needs a new field before a report can order the fixtures, then verify existing allure-pytest tests still pass.
索引モデルが issue の本文から書いたものです。
説明
Example:
import pytest
import allure
def func(n):
return n**2
@pytest.fixture()
def input_data():
with allure.step("Prepare input data"):
data = 5
return data
@pytest.fixture()
def compute_job(input_data):
with allure.step("Compute result"):
result = func(input_data)
return result
def test(compute_job):
with allure.step("Verify result"):
assert compute_job == 25
In this case, allure output json files contain no information that allows to deduce that the compute_job fixture depends on the input_data fixture.
Since they are fast, time ordering is not possible in most cases, since times are only recorded as integer seconds.
The allure report then shows the two fixtures in the wrong order:
Output json files:
allure/404698a7-6d47-46ee-951e-f1370a8ae247-container.json
{
"uuid": "a00b000b-e3bf-4599-b1fe-f99a4d9265fb",
"children": [
"cb8afcb4-86c9-4ec5-b7c1-def3c168afde"
],
"befores": [
{
"name": "compute_job",
"status": "passed",
"steps": [
{
"name": "Compute result",
"status": "passed",
"start": 1791292365354,
"stop": 1791292365354
}
],
"start": 1791292365354,
"stop": 1791292365354
}
],
"afters": [
{
"name": "compute_job::<lambda>",
"start": 1791292365355
}
],
"start": 1791292365354,
"stop": 1791292365355
}
allure/b068721b-3ae1-4959-9376-e840e763dbee-container.json
{
"uuid": "76f7b786-56ff-4b9b-9931-98c632f44c92",
"children": [
"cb8afcb4-86c9-4ec5-b7c1-def3c168afde"
],
"befores": [
{
"name": "input_data",
"status": "passed",
"steps": [
{
"name": "Prepare input data",
"status": "passed",
"start": 1791292365354,
"stop": 1791292365354
}
],
"start": 1791292365354,
"stop": 1791292365354
}
],
"afters": [
{
"name": "input_data::<lambda>",
"start": 1791292365355
}
],
"start": 1791292365354,
"stop": 1791292365355
}
allure/a16a30e1-80d0-4a0e-8dda-54c1cbbb5157-result.json
{
"name": "test",
"status": "passed",
"steps": [
{
"name": "Verify result",
"status": "passed",
"start": 1791292365355,
"stop": 1791292365355
}
],
"start": 1791292365355,
"stop": 1791292365355,
"uuid": "cb8afcb4-86c9-4ec5-b7c1-def3c168afde",
"historyId": "761acda85279d873545739563f5f4cb2",
"testCaseId": "761acda85279d873545739563f5f4cb2",
"fullName": "test_example#test",
"labels": [
{
"name": "suite",
"value": "test_example"
},
{
"name": "host",
"value": "max-desktop"
},
{
"name": "thread",
"value": "980504-MainThread"
},
{
"name": "framework",
"value": "pytest"
},
{
"name": "language",
"value": "cpython3"
},
{
"name": "package",
"value": "test_example"
}
],
"titlePath": [
"test_example.py"
]
}
- 主要言語
- Python
- スター
- 819
- フォーク
- 261
- 平均マージ
- 3時間 20分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
allure-framework/allure-python のほかの issue
-
[allure-behave] Steps from tag-excluded scenarios bleed into the next matching scenario's result when hide_excluded=true対応中かも @liuyaohui666 が 48 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
allure-framework/allure-python#930 · コメント 3 件 ·
-
Added Categoriesオープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
Phantom <lambda> teardown entries with unknown status when using pytest 9.1+対応中かも @Mohanad49 が 53 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
allure-framework/allure-python#918 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
allure-framework/allure-python#903 · コメント 1 件 ·
allure-framework/allure-python の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Deepak3699/Ai_Mentor#244 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
btclib-org/btclib-node#1880 ·
メンテナーはふだん 1 日以内に返信
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handled対応中かも @khuisman が今日担当しました。 オープンv0.9.2
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
khuisman/mcp-gee-sweet#941 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pyjanitor-devs/pyjanitor#1758 ·
メンテナーはふだん 1 日以内に返信
-
bug ready for review
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
odysseus-dev/odysseus#6641 ·
メンテナーはふだん 1 日以内に返信