Skip to content

Instantly share code, notes, and snippets.

@djrtwo
Created June 4, 2018 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djrtwo/8b6b75590a327963f212220182f54a4d to your computer and use it in GitHub Desktop.
Save djrtwo/8b6b75590a327963f212220182f54a4d to your computer and use it in GitHub Desktop.
@pytest.fixture
def base_tester():
> return EthereumTester(PyEVMBackend())
tests/conftest.py:246:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.6/site-packages/eth_tester/backends/pyevm/main.py:262: in __init__
self.reset_to_genesis()
venv/lib/python3.6/site-packages/eth_tester/backends/pyevm/main.py:293: in reset_to_genesis
self.account_keys, self.chain = setup_tester_chain()
venv/lib/python3.6/site-packages/eth_tester/backends/pyevm/main.py:144: in setup_tester_chain
chain = MainnetTesterChain.from_genesis(db, genesis_params, genesis_state)
venv/lib/python3.6/site-packages/evm/chains/base.py:324: in from_genesis
account_db.persist()
venv/lib/python3.6/site-packages/evm/db/account.py:399: in persist
self._batchtrie.commit(apply_deletes=False)
venv/lib/python3.6/site-packages/evm/db/batch.py:45: in commit
self.diff().apply_to(self.wrapped_db, apply_deletes)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <evm.db.diff.DBDiff object at 0x10a20ccf8>, db = <evm.db.chain.ChainDB object at 0x10a29b860>, apply_deletes = False
def apply_to(self, db: MutableMapping, apply_deletes: bool = True) -> None:
"""
Apply the changes in this diff to the given database.
You may choose to opt out of deleting any underlying keys.
:param apply_deletes: whether the pending deletes should be
applied to the database
"""
for key, value in self._changes.items():
if value is DELETED:
if apply_deletes:
try:
del db[key]
except KeyError:
pass
else:
pass
else:
> db[key] = value
E TypeError: 'ChainDB' object does not support item assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment