Skip to content

Conversation

@spencer-tb
Copy link
Collaborator

@spencer-tb spencer-tb commented Jan 11, 2024

🗒️ Description

Refactor of the framework unit tests within: #350

  • Added a folder for tests specific to the filling of the framework.
  • Merge both storage and accounts tests, as to me they are all related.
  • Used pytest parameterization for tests to align better with the other framework tests.

marioevz and others added 20 commits December 21, 2023 13:10
* ethereum_test_forks: implement fork operators, remove `is_fork`

* changelog
* feat: add evm bytes to python converter

* entry_points/tests: add tests for evm bytes parser.

* evm_bytes_to_python: Add help

* changelog

---------

Co-authored-by: spencer-tb <[email protected]>
* all: abstract fixtures, convert StateTest into a BlockchainTest generator

* fix: tox
…xture formats; Per-format sub-folder output (ethereum#358)

* tools: Move fixture collector to spec

* refactor: Fixtures collector

* all: remove `BaseTestConfig`

* fix: all filler tests

* docs: update

* tox: spelling

* feat: Parametrize the supported fixture types for each test type

* fix: many tests

* fix: remaining tests

* fix: fixture name case

* fix: Indirect parametrize using fixture format

* feat: Dynamic generation of spec test fixtures

* fix: type-checking

* fix: imports

* feat(pytest): allow filtering by fixture format via pytest mark (#12)

* feat(pytest): allow filtering by fixture format via pytest mark

* feat(fw): give unset fixture format a more verbose name

* feat(pytest): only paramatrize post-merge forks with hive format (#13)

* feat(pytest): remove items which are pre-merge and have hive format

* chore: make exception string clearer; fix whitespace

* fix(pytest): test_filler: remove `enable_hive` completely

* fix: Remove unused `STATE_TEST_HIVE`

---------

Co-authored-by: danceratopz <[email protected]>
all: Support `ethereum/tests` StateTest format
@spencer-tb spencer-tb changed the base branch from main to unit_tests January 11, 2024 17:52
@spencer-tb spencer-tb changed the title Unit test/small refactor test(fw): add/refactor test_filling tests Jan 11, 2024
marioevz and others added 2 commits January 15, 2024 11:55
…dd contract creation type-3 test (ethereum#379)

* fix(tests): 4844: fix gas calculation

* tests: 4844: Add more blob tx gas fee calculation scenarios

* changelog

* spelling

* tools(feat): Allow txs to have predefined RLP

* fix(tests): Fix type-3 contract creating test

* typing fix

* changelog
@danceratopz
Copy link
Member

I think we should improve the underlying exception classes in order to make them easier to test. It took me a bit longer than expected to understand what is being tested 😆

I always manage to find more work 😅

Will get back to this with an idea.

@spencer-tb
Copy link
Collaborator Author

Oh sounds interesting! More exception classes sound ideal to be honest

@danceratopz
Copy link
Member

Oh sounds interesting! More exception classes sound ideal to be honest

No new classes needed upfront. But if you make the Exception class a dataclass, you get an __eq__() method for free, which you can then directly use to check for equality. Currently, we can't do this. This is a very small change, just verifying it doesn't break anything.

@danceratopz danceratopz merged commit 299dabe into ethereum:unit_tests Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants