Skip to content

Commit

Permalink
Added test for null registry to basecodec
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmendoza committed Nov 24, 2018
1 parent f939865 commit d63273c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eth_abi/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BaseABICodecEncoder():
def __init__(self, registry):
if registry is None:
raise ValueError("`registry` may not be None")

self._registry = registry

def encode_single(self, typ: TypeStr, arg: Any) -> bytes:
Expand Down
6 changes: 6 additions & 0 deletions tests/test_codec/test_base_abi_codec_encoder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import pytest

from eth_abi.codec import (
BaseABICodecEncoder,
)


def test_init_raises_error_for_null_registry():
with pytest.raises(ValueError):
BaseABICodecEncoder(None)

0 comments on commit d63273c

Please sign in to comment.