vyperlang / titanoboa

a vyper interpreter
https://titanoboa.readthedocs.io
Other
255 stars 51 forks source link

`test_value_error` fails (on MacOS?) #256

Open PatrickAlphaC opened 4 months ago

PatrickAlphaC commented 4 months ago

Running:

pytest -x --ignore=tests/integration

Results in the following:

tests/unitary/jupyter/test_handlers.py ...F

======================================================================================== FAILURES ========================================================================================
____________________________________________________________________________________ test_value_error ____________________________________________________________________________________

callback_handler = <boa.integrations.jupyter.handlers.CallbackHandler object at 0x108b6c550>, token = '780358735c8254fb5e0eee06c40d7e'
shared_memory = SharedMemory('780358735c8254fb5e0eee06c40d7e', size=106496)

    def test_value_error(callback_handler, token, shared_memory):
        callback_handler.request.body = b"0" * SHARED_MEMORY_LENGTH  # no space for the \0
        callback_handler.post(token)
>       assert callback_handler.get_status() == 413
E       assert <HTTPStatus.NO_CONTENT: 204> == 413
E        +  where <HTTPStatus.NO_CONTENT: 204> = <bound method RequestHandler.get_status of <boa.integrations.jupyter.handlers.CallbackHandler object at 0x108b6c550>>()
E        +    where <bound method RequestHandler.get_status of <boa.integrations.jupyter.handlers.CallbackHandler object at 0x108b6c550>> = <boa.integrations.jupyter.handlers.CallbackHandler object at 0x108b6c550>.get_status

tests/unitary/jupyter/test_handlers.py:80: AssertionError
==================================================================================== warnings summary ====================================================================================
venv/lib/python3.10/site-packages/jupyter_server/base/handlers.py:23
  /path/titanoboa/venv/lib/python3.10/site-packages/jupyter_server/base/handlers.py:23: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import is_hidden

venv/lib/python3.10/site-packages/_hypothesis_pytestplugin.py:444
  /path/titanoboa/venv/lib/python3.10/site-packages/_hypothesis_pytestplugin.py:444: PytestRemovedIn9Warning: Marks applied to fixtures have no effect
  See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
    return _orig_call(self, function)

tests/unitary/contracts/abi/test_abi.py::test_abi_invalid_components
  /path/titanoboa/venv/lib/python3.10/site-packages/boa/contracts/abi/abi_contract.py:361: UserWarning: Requested <<anonymous contract> interface at 0x0000000000000000000000000000000000000000 (WARNING: no bytecode at this address!)> but there is no bytecode at that address!
    contract = ABIContract(

tests/unitary/jupyter/test_browser.py::test_browser_sign_transaction
  /path/titanoboa/venv/lib/python3.10/site-packages/boa/contracts/vyper/vyper_contract.py:550: UserWarning: No EIP-1559 transaction available, falling back to legacy
    address, computation = self.env.deploy(

tests/unitary/jupyter/test_browser.py::test_browser_sign_transaction
  /path/titanoboa/venv/lib/python3.10/site-packages/boa/contracts/vyper/vyper_contract.py:550: UserWarning: 'eth_maxPriorityFeePerGas'
    address, computation = self.env.deploy(

tests/unitary/jupyter/test_browser.py::test_browser_sign_transaction
  /path/titanoboa/venv/lib/python3.10/site-packages/boa/network.py:482: RuntimeWarning: coroutine '_wait_buffer_set.<locals>._async_wait' was never awaited
    tx_data["chainId"] = chain_id
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/unitary/jupyter/test_browser.py::test_browser_sign_transaction
  /other_path/.pyenv/versions/3.10.14/lib/python3.10/functools.py:981: UserWarning: debug_traceTransaction not available! titanoboa will try hard to interact with the network, but this means that titanoboa is not able to do certain safety checks at runtime. it is recommended to switch to a node or provider with debug_traceTransaction.
    val = self.func(instance)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

I'm on macos. Maybe that's why?

charles-cooper commented 4 months ago

@DanielSchiavini any ideas here?