These are chat archives for ethereum/pydevp2p

21st
Jan 2016
Paweł Bylica
@chfast
Jan 21 2016 10:02

So @heikoheiko @ms83 the thing is like this:
Running

$ py.test devp2p/tests/test_kademlia_protocol.py
============================= test session starts =============================
platform win32 -- Python 2.7.11, pytest-2.8.5, py-1.4.31, pluggy-0.3.1
rootdir: C:\MinGW\msys\1.0\home\chfast\Projects\golem\pydevp2p, inifile:
plugins: catchlog-1.2.1, timeout-1.0.0
collected 12 items

devp2p\tests\test_kademlia_protocol.py ..X.X.X.....

===================== 9 passed, 3 xpassed in 9.16 seconds =====================

is ok.

But running full test suite is not ok. Seems like earlier tests interferes with gevent in later tests...

$ py.test -s
============================= test session starts =============================
platform win32 -- Python 2.7.11, pytest-2.8.5, py-1.4.31, pluggy-0.3.1
rootdir: C:\MinGW\msys\1.0\home\chfast\Projects\golem\pydevp2p, inifile:
plugins: catchlog-1.2.1, timeout-1.0.0
collecting 0 itemsC:\MinGW\msys\1.0\home\chfast\Projects\golem\pydevp2p\devp2p\crypto.py:37: UserWarning: could not import c_secp256k1, fallback to bitcointools
  warnings.warn('could not import c_secp256k1, fallback to bitcointools')
collected 75 items

devp2p\tests\test_crypto.py ........
devp2p\tests\test_discovery.py ....test bootstrap from=<Node(c42b774e)> to=<Node(3b9ad1d4)>
test bootstrap from=<Node(562f2f68)> to=<Node(3b9ad1d4)>
test bootstrap from=<Node(7841181a)> to=<Node(3b9ad1d4)>
test bootstrap from=<Node(1213a1b9)> to=<Node(3b9ad1d4)>
test bootstrap from=<Node(2cc3f4d3)> to=<Node(3b9ad1d4)>
test find_node from=<Node(c42b774e)>
test find_node from=<Node(562f2f68)>
test find_node from=<Node(7841181a)>
test find_node from=<Node(1213a1b9)>
test find_node from=<Node(2cc3f4d3)>
5
5
5
5
5
5
.
devp2p\tests\test_ecies.py ..........
devp2p\tests\test_go_handshake.py .header (0, 0)
packet_type 0
frame {'client_version_string': 0, 'version': 3, 'remote_pubkey': 'v-\xd8\xa0cn\x07\xa5K1\x16\x9e\xba\x0cz \xa1\xac\x1e\xf6\x85\x96\xf1\xf2\x83\xb5\xc6v\xba\xe4\x06J\xbf\xcc\xe2G\x99\xd0\x9fg\xe3\x92c-?\xfd\xc1.=d0\xdc\xb0\xea\x19\xc3\x184?\xfaz\xaet\xd4', 'listen_port': 0, 'capabilities': (('a', 0), ('b', 2))}
.
devp2p\tests\test_go_signature.py ..
devp2p\tests\test_kademlia.py ........
devp2p\tests\test_kademlia_protocol.py ..
+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++

~~~~~~~~~~~~~~~~~~~~~~~~~~ Stack of <unknown> (5808) ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  File "c:\mingw\msys\1.0\home\chfast\.virtualenvs\eth\lib\site-packages\gevent\threadpool.py", line 196, in _worker
    task = task_queue.get()
  File "c:\mingw\msys\1.0\home\chfast\.virtualenvs\eth\lib\site-packages\gevent\_threading.py", line 435, in get
    self.not_empty.wait()
  File "c:\mingw\msys\1.0\home\chfast\.virtualenvs\eth\lib\site-packages\gevent\_threading.py", line 151, in wait
    waiter.acquire()

~~~~~~~~~~~~~~~~~~~~~~~~~~ Stack of MainThread (824) ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  File "c:\mingw\msys\1.0\home\chfast\.virtualenvs\eth\lib\site-packages\gevent\hub.py", line 643, in run
    loop.run()

+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++

The same issue I had with "full app" tests so I removed them for now.