Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

test_cherrypy.py fails with py3 #72

Closed
idella opened this Issue · 3 comments

2 participants

@idella

This appears to have been in place for some time. I only picked it up in the process of preparing a version bump, to 0.2.4, requested by another, gentoo

platform linux2 -- Python 3.2.3 -- pytest-2.2.4
collected 22 items

test/test_cherrypy.py F
test/test_frame.py ............
test/test_stream.py .........

=================================== FAILURES ===================================
___________________________ CherryPyTest.test_plugin ___________________________

self =

def test_plugin(self):
    self.assertEquals(len(cherrypy.engine.websocket.pool), 0)

    s = FakeSocket()
    h = EchoWebSocket(s, [], [])
    cherrypy.engine.publish('handle-websocket', h, ('127.0.0.1', 0))
    self.assertEquals(len(cherrypy.engine.websocket.pool), 1)
  k = cherrypy.engine.websocket.pool.keys()[0]

E TypeError: 'dict_keys' object does not support indexing

test/test_cherrypy.py:68: TypeError
===================== 1 failed, 21 passed in 0.67 seconds ======================

  • ERROR: dev-python/ws4py-0.2.3 failed (test phase):

You can tell me if this is coming from ws4py here of from cherrypy itself. Holds true for
cherrypy-3.2.0 - 3.2.2

@Lawouach
Owner

Likely from ws4py. I assume you are using Python 3 but which release precisely. Could you also try ws4py 0.2.4 instead pleease?

@idella

========================== 22 passed in 0.39 seconds ===========================

  • Testing of dev-python/ws4py-0.2.4 with CPython 3.2... ============================= test session starts ============================== platform linux2 -- Python 3.2.3 -- pytest-2.2.4 collected 22 items

test/test_cherrypy.py F
test/test_frame.py ............
test/test_stream.py .........

=================================== FAILURES ===================================
___________________________ CherryPyTest.test_plugin ___________________________

self =

def test_plugin(self):
    self.assertEquals(len(cherrypy.engine.websocket.pool), 0)

    s = FakeSocket()
    h = EchoWebSocket(s, [], [])
    cherrypy.engine.publish('handle-websocket', h, ('127.0.0.1', 0))
    self.assertEquals(len(cherrypy.engine.websocket.pool), 1)
  k = cherrypy.engine.websocket.pool.keys()[0]

E TypeError: 'dict_keys' object does not support indexing

test/test_cherrypy.py:68: TypeError
===================== 1 failed, 21 passed in 0.61 seconds ======================

  • ERROR: dev-python/ws4py-0.2.4 failed (test phase):
  • Testing failed with CPython 3.2 in testing() function

I intended ws4py 0.2.4 actually.
scimath # python -V
Python 3.2.3
Is there any further prcision to 3.2.3?

thx

@Lawouach Lawouach closed this issue from a commit
@Lawouach fixed #72 4ec8638
@Lawouach Lawouach closed this in 4ec8638
@idella

Lawouach; very good, thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.