Skip to content

Commit

Permalink
time tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gurukamath committed Aug 30, 2024
1 parent 8638491 commit 0da6a82
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
8 changes: 8 additions & 0 deletions tests/prague/test_evm_tools.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
from functools import partial
from typing import Dict, Generator, Tuple

Expand Down Expand Up @@ -48,4 +49,11 @@ def fetch_temporary_tests(test_dirs: Tuple[str, ...]) -> Generator:
ids=idfn,
)
def test_evm_tools(test_case: Dict) -> None:
test_file = test_case["test_file"]
test_key = test_case["test_key"]
print(f"\nTest file: {test_file} -- Test key: {test_key}")
t0 = time.time()
run_evm_tools_test(test_case)
t1 = time.time()
total = t1 - t0
print(f"Total time: {total}")
8 changes: 8 additions & 0 deletions tests/prague/test_state_transition.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
from functools import partial
from typing import Dict, Generator, Tuple

Expand Down Expand Up @@ -119,4 +120,11 @@ def fetch_temporary_tests(test_dirs: Tuple[str, ...]) -> Generator:
ids=idfn,
)
def test_execution_specs_generated_tests(test_case: Dict) -> None:
test_file = test_case["test_file"]
test_key = test_case["test_key"]
print(f"\nTest file: {test_file} -- Test key: {test_key}")
t0 = time.time()
run_prague_blockchain_st_tests(test_case)
t1 = time.time()
total = t1 - t0
print(f"Total time: {total}")
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ commands =
extras =
test
commands =
pytest \
pytest -s \
-m "not slow" \
-n auto --maxprocesses 5 \
tests/prague/ \
--durations 20 \
--cov=ethereum --cov-report=term --cov-report "xml:{toxworkdir}/coverage.xml" \
--ignore-glob='tests/fixtures/*' \
--basetemp="{temp_dir}/pytest"
Expand All @@ -32,12 +33,13 @@ extras =
passenv =
PYPY_GC_MAX
commands =
pytest \
pytest -s \
--tb=no \
--show-capture=no \
--disable-warnings \
-m "not slow" \
-n auto --maxprocesses 2 \
tests/prague/ \
--durations 20 \
--ignore-glob='tests/fixtures/*' \
--basetemp="{temp_dir}/pytest"

Expand Down

0 comments on commit 0da6a82

Please sign in to comment.