omgnetwork/plasma-mvp

Test doesn't work on OSX 10.13.4 python 3.7

hailq opened this issue · 2 comments

hailq commented

Issue Type

[x] bug report
[ ] feature request

Current Behavior

Couldn't run the test code

Expected Behavior

Pass all the test cases

Steps to Reproduce

  1. brew install python
  2. brew install openssl
  3. virtualenv env -p python3
  4. source env/bin/activate
  5. env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install scrypt
  6. make
  7. ganache-cli
  8. make test
  • Full output of error:
Traceback (most recent call last):
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/pytest-3.7.1-py3.7.egg/_pytest/config/__init__.py", line 372, in _getconftestmodules
    return self._path2confmods[path]
KeyError: local('/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/tests')

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/pytest-3.7.1-py3.7.egg/_pytest/config/__init__.py", line 403, in _importconftest
    return self._conftestpath2mod[conftestpath]
KeyError: local('/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/tests/conftest.py')

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/pytest-3.7.1-py3.7.egg/_pytest/config/__init__.py", line 409, in _importconftest
    mod = conftestpath.pyimport()
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/py-1.5.4-py3.7.egg/py/_path/local.py", line 668, in pyimport
    __import__(modname)
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/pytest-3.7.1-py3.7.egg/_pytest/assertion/rewrite.py", line 226, in load_module
    py.builtin.exec_(co, mod.__dict__)
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/tests/conftest.py", line 7, in <module>
    from plasma.root_chain.deployer import Deployer
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/plasma/root_chain/deployer.py", line 4, in <module>
    from web3.contract import ConciseContract
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/web3-4.3.0-py3.7.egg/web3/__init__.py", line 8, in <module>
    from web3.main import Web3  # noqa: E402
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/web3-4.3.0-py3.7.egg/web3/main.py", line 26, in <module>
    from web3.providers.eth_tester import (
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/web3-4.3.0-py3.7.egg/web3/providers/__init__.py", line 8, in <module>
    from .websocket import WebsocketProvider  # noqa: F401
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/web3-4.3.0-py3.7.egg/web3/providers/websocket.py", line 9, in <module>
    import websockets
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/websockets-4.0.1-py3.7-macosx-10.13-x86_64.egg/websockets/__init__.py", line 3, in <module>
    from .client import *
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/websockets-4.0.1-py3.7-macosx-10.13-x86_64.egg/websockets/client.py", line 20, in <module>
    from .protocol import WebSocketCommonProtocol
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/websockets-4.0.1-py3.7-macosx-10.13-x86_64.egg/websockets/protocol.py", line 18, in <module>
    from .compatibility import asyncio_ensure_future
  File "/Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/env/lib/python3.7/site-packages/websockets-4.0.1-py3.7-macosx-10.13-x86_64.egg/websockets/compatibility.py", line 15
    asyncio_ensure_future = asyncio.async           # Python < 3.5
                                        ^
SyntaxError: invalid syntax
ERROR: could not load /Users/ho_oh/Developments/hailq/blockchain/plasma-mvp/tests/conftest.py
  • Command that caused error:
  • Code that caused error:

Suggested Fix

Motivation for Change

System Specs

  • python version: 3.7.0
  • pyetherem version:
  • environment (output of running pip freeze):
  • operating system: OSX 10.13.4

Possible duplicate of #167

Closing as duplicate of #167. Fix is currently to use py3.6, will update README to reflect this.