Skip to content

test_cherrypy.py fails with py3 #72

@idella

Description

@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 = <test.test_cherrypy.CherryPyTest testMethod=test_plugin>

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions