Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from execution_testing.checklists.eip_checklist import EIPChecklist

TEMPLATE_PATH = (
Path(__file__).parent.parent.parent.parent
Path(__file__).parent.parent.parent.parent.parent.parent.parent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use .parents[...] instead of chaining so many parent traversals together?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use .parents[...] instead of chaining so many parent traversals together?

yes using parents index will be much better. but i went with chained calls cause in previous code they were using it

/ "docs"
/ "writing_tests"
/ "checklist_templates"
Expand Down Expand Up @@ -60,7 +60,7 @@ def get_all_checklist_ids(obj: Any) -> Set[str]:
return ids


@pytest.mark.skip(reason="Skipping test until ./docs/ folder is subtree'd")

def test_checklist_template_consistency() -> None:
"""
Test that all IDs in markdown template match EIPChecklist class exactly.
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_checklist_template_consistency() -> None:
pytest.fail(error_message)


@pytest.mark.skip(reason="Skipping test until ./docs/ folder is subtree'd")

def test_checklist_template_exists() -> None:
"""Test that the checklist template file exists."""
assert TEMPLATE_PATH.exists(), (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
"| TOTAL_CHECKLIST_ITEMS | COVERED_CHECKLIST_ITEMS | PERCENTAGE |"
)
TEMPLATE_PATH = (
Path(__file__).parents[3]
Path(__file__).parents[8]
/ "docs"
/ "writing_tests"
/ "checklist_templates"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest


@pytest.mark.skip(reason="S kipping test until ./docs/ folder is subtree'd")

def test_eip_checklist_collection(testdir: Any) -> None:
"""Test that checklist markers are collected correctly."""
# Create the test in an EIP-specific directory
Expand Down Expand Up @@ -92,12 +92,7 @@ def test_berlin_one(state_test: StateTestFiller) -> None:
str(testdir.tmpdir / "checklists"),
str(tests_dir),
)
result.assert_outcomes(
passed=0,
failed=0,
skipped=0,
errors=0,
)
result.assert_outcomes(errors=0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

initially i made those changes cause checking errors=0 was enough to prove code path didn't crash, i'll undo the changes


# Check that checklists were generated
checklist_dir = testdir.tmpdir / "checklists"
Expand Down