AttributeErrror: '__HookRelay' object has no attribute 'pytest_bdd_before_scenario'
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu tại _execute_scenario, nơi request.config.hook.pytest_bdd_before_scenario được gọi, và tái hiện lỗi với scenario sample.feature được mô tả trong traceback. Theo dõi cách pytest hook relay được cấu hình và xác minh rằng scenario chạy mà không gặp AttributeError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I am getting the error while running the pytest bdd scenario:
request = <FixtureRequest for >
@scenario(featrure_name='sample.feature', scenario_name ' sample', feature_base_dir='usr/local/bin/test', strict_gherkin=False)
def test-arguments_for_given_when_thens():
def _execute_scenario(feature, scenario, request, encoding):
"""Execute the scenario.
:param feature: Feature.
:param scenario: Scenario.
:param request: request.
:param encoding: Encoding.
"""
request.config.hook.pytest_bdd_before_scenario(
request=request,
feature=feature,
scenario=scenario,
)
E AttributeErrror: '__HookRelay' object has no attribute 'pytest_bdd_before_scenario'
- Ngôn ngữ chính
- Python
- Star
- 1.5k
- Fork
- 253
- Merge trung bình
- 4 giờ 30 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pytest-dev/pytest-bdd
-
New release to update `gherkin`?Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pytest-dev/pytest-bdd#838 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
pytest-dev/pytest-bdd#805 ·
-
YAML support removed in v8Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
pytest-dev/pytest-bdd#785 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
pytest-dev/pytest-bdd#784 ·
-
Tests with failing setup fixture should get the "Error" statusCó thể đã có người làm @zvarych-oleksii đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
pytest-dev/pytest-bdd#782 · 1 bình luận ·
Tất cả issue của pytest-dev/pytest-bdd
Issue tương tự
-
[Bug]: AdaLAM's draw_first_k_couples repeats couples already drawn instead of the next ones (8 of the default 128 RANSAC hypotheses)Có thể đã có người làm @1sakshm đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
TheAlgorithms/Python#15656 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[integration]: langchain-gridpinĐang mởexternal integration integration-submission
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
langchain-ai/docs#7128 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
kaifcodec/user-scanner#755 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
eclipse-score/mcp-servers#61 ·
Maintainer thường phản hồi trong vòng 4 ngày