Maybe use a registry fixture to test custom registrations
- Dominant language
- Python
- Stars
- 256
- Forks
- 117
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
### What was wrong?
In the following integration tests that test custom registrations, our method of testing is a bit stateful since it registers then unregisters coders for the custom data type. If one test fails, that could lead to a confusing failure in another test when the registry complains that a registration already exists for the custom type:
https://github.com/ethereum/eth-abi/blob/master/tests/test_integration/test_custom_registrations.py#L69-L99
### How can it be fixed?
We could modify those tests to use a fixture registry instance that is created per test run. If we want to continue to do true integration testing via `encode_single` and `decode_single`, we will probably need to modify the API to support use of a custom registry instance.
Contributor guide
Assessment
This issue has not been assessed yet.