Skip to content

Commit e375c01

Browse files
committed
chore(ruff): changes to tests/constantinople/.
1 parent fa21f39 commit e375c01

File tree

5 files changed

+27
-23
lines changed

5 files changed

+27
-23
lines changed

tests/constantinople/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
"""
2-
Test cases for EVM functionality introduced in Constantinople.
3-
"""
1+
"""Test cases for EVM functionality introduced in Constantinople."""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
abstract: Test [EIP-1014: Skinny CREATE2](https://eips.ethereum.org/EIPS/eip-1014)
2+
abstract: Test [EIP-1014: Skinny CREATE2](https://eips.ethereum.org/EIPS/eip-1014).
33
44
Tests for [EIP-1014: Skinny CREATE2](https://eips.ethereum.org/EIPS/eip-1014).
55
"""
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
"""
2-
Defines EIP-1014 specification constants and functions.
3-
"""
1+
"""Defines EIP-1014 specification constants and functions."""
42
from dataclasses import dataclass
53

64

75
@dataclass(frozen=True)
86
class ReferenceSpec:
9-
"""
10-
Defines the reference spec version and git path.
11-
"""
7+
"""Defines the reference spec version and git path."""
128

139
git_path: str
1410
version: str
@@ -21,5 +17,5 @@ class ReferenceSpec:
2117
class Spec:
2218
"""
2319
Parameters from the EIP-1014 specifications as defined at
24-
https://eips.ethereum.org/EIPS/eip-1014
20+
https://eips.ethereum.org/EIPS/eip-1014.
2521
"""

tests/constantinople/eip1014_create2/test_create_returndata.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
"""
22
Return data management around create2
33
Port call_outsize_then_create2_successful_then_returndatasizeFiller.json test
4-
Port call_then_create2_successful_then_returndatasizeFiller.json test
4+
Port call_then_create2_successful_then_returndatasizeFiller.json test.
55
"""
66

77
import pytest
88

9-
from ethereum_test_tools import Account, Alloc, Environment
9+
from ethereum_test_tools import (
10+
Account,
11+
Alloc,
12+
Environment,
13+
StateTestFiller,
14+
Transaction,
15+
keccak256,
16+
)
1017
from ethereum_test_tools import Opcodes as Op
11-
from ethereum_test_tools import StateTestFiller, Transaction, keccak256
1218

1319
from .spec import ref_spec_1014
1420

@@ -29,9 +35,7 @@ def test_create2_return_data(
2935
pre: Alloc,
3036
state_test: StateTestFiller,
3137
):
32-
"""
33-
Validate that create2 return data does not interfere with previously existing memory
34-
"""
38+
"""Validate that create2 return data does not interfere with previously existing memory."""
3539
# Storage vars
3640
slot_returndatasize_before_create = 0
3741
slot_returndatasize_after_create = 1
@@ -90,7 +94,6 @@ def test_create2_return_data(
9094
slot_returndatacopy_before_create: 0xFF,
9195
slot_returndatacopy_before_create_2: 0xFF,
9296
slot_begin_memory_after_create: 0xFF,
93-
slot_begin_memory_after_create: 0xFF,
9497
},
9598
)
9699

tests/constantinople/eip1014_create2/test_recreate.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
"""
2-
Test Account Self-destruction and Re-creation
3-
"""
1+
"""Test Account Self-destruction and Re-creation."""
42

53
import pytest
64

75
from ethereum_test_forks import Fork
8-
from ethereum_test_tools import Account, Alloc, Block, BlockchainTestFiller, Environment, Initcode
6+
from ethereum_test_tools import (
7+
Account,
8+
Alloc,
9+
Block,
10+
BlockchainTestFiller,
11+
Environment,
12+
Initcode,
13+
Transaction,
14+
Yul,
15+
compute_create2_address,
16+
)
917
from ethereum_test_tools import Opcodes as Op
10-
from ethereum_test_tools import Transaction, Yul, compute_create2_address
1118

1219
from .spec import ref_spec_1014
1320

0 commit comments

Comments
 (0)