ApeWorX / ApeWorX/eth-abi

Maybe use a registry fixture to test custom registrations

Open
#77 5 comments 1 reaction 0 assignees View on GitHub
p4
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.