Skip to content

Commit

Permalink
🥢 nit: make: Update sender
Browse files Browse the repository at this point in the history
  • Loading branch information
raxhvl committed Nov 22, 2024
1 parent d0f6f5b commit c93a9bf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
12 changes: 9 additions & 3 deletions src/cli/et/make/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,15 @@ def test():

click.echo(
click.style(
f"\n 🎉 Success! Test file created at: {file_path}"
f"\n 📝 Get started with tests: {DocsConfig().DOCS_URL__WRITING_TESTS}" # noqa 501
f"\n ⛽ To fill this test, run: `uv run fill {file_path} --until={fork}`",
f"\n 🎉 Success! Test file created at: {file_path}",
fg="green",
)
)

click.echo(
click.style(
f"\n 📝 Get started with tests: {DocsConfig().DOCS_URL__WRITING_TESTS}"
f"\n ⛽ To fill this test, run: `uv run fill {file_path} --until={fork}`",
fg="cyan",
)
)
7 changes: 3 additions & 4 deletions src/cli/et/make/templates/blockchain_test.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ def test_{{test_name}}(blockchain_test: BlockchainTestFiller, pre: Alloc):

TODO: (Optional) Enter a more detailed test function description here.
"""
tx = Transaction(
sender=pre.fund_eoa(),
to="0x000000000000000000000000000000000001abe1",
)
sender = pre.fund_eoa()

tx = Transaction(sender=sender, to=sender)

post: dict[str, dict] = {}

Expand Down
7 changes: 3 additions & 4 deletions src/cli/et/make/templates/state_test.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ def test_{{test_name}}(state_test: StateTestFiller, pre: Alloc):
"""
env = Environment()

tx = Transaction(
sender=pre.fund_eoa(),
to="0x000000000000000000000000000000000001abe1",
)
sender = pre.fund_eoa()

tx = Transaction(sender=sender, to=sender)

post: dict[str, dict] = {}

Expand Down
4 changes: 1 addition & 3 deletions src/config/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

from pydantic import BaseModel

from .app import AppConfig


class DocsConfig(BaseModel):
"""
Expand All @@ -21,7 +19,7 @@ class DocsConfig(BaseModel):
GENERATE_UNTIL_FORK: str = "Osaka"
"""The fork until which documentation should be generated."""

DOCS_BASE_URL: str = f"https://ethereum.github.io/execution-spec-tests/v{AppConfig().version}"
DOCS_BASE_URL: str = "https://ethereum.github.io/execution-spec-tests"

# Documentation URLs prefixed with `DOCS_URL__` to avoid conflicts with other URLs
DOCS_URL__WRITING_TESTS: str = f"{DOCS_BASE_URL}/writing_tests/"

0 comments on commit c93a9bf

Please sign in to comment.