Skip to content

Commit

Permalink
Merge pull request #821 from oberstet/rel_0_18_2
Browse files Browse the repository at this point in the history
Rel 0 18 2
  • Loading branch information
oberstet committed Apr 15, 2017
2 parents d9c60be + c3504ea commit 731228a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
7 changes: 2 additions & 5 deletions autobahn/asyncio/test/test_asyncio_rawsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,13 @@ def test_raw_socket_server1(self):
server.stringReceived = receiver

server.connection_made(transport)
# XXX this test was disabled for a while, and had \xF1 instead
# of \x51 in the second octet previously; changing it
# presuming the 'real' code is correct
hs = b'\x7F\x51\x00\x00' + b'\x00\x00\x00\x04abcd'
hs = b'\x7F\xF1\x00\x00' + b'\x00\x00\x00\x04abcd'
server.data_received(hs)

ser.assert_called_once_with(1)
on_hs.assert_called_once_with()
self.assertTrue(transport.write.called)
transport.write.assert_called_once_with(b'\x7F\x51\x00\x00')
transport.write.assert_called_once_with(b'\x7F\xF1\x00\x00')
self.assertFalse(transport.close.called)
receiver.assert_called_once_with(b'abcd')

Expand Down
4 changes: 3 additions & 1 deletion autobahn/asyncio/test/test_asyncio_websocket.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
import os
import sys

# because py.test tries to collect it as a test-case
try:
Expand All @@ -16,8 +17,9 @@
import txaio


@pytest.mark.skipif(sys.version_info < (3, 3), reason="requires Python 3.3+")
@pytest.mark.skipif(os.environ.get('USE_ASYNCIO', False) is False, reason="only for asyncio")
@pytest.mark.usefixtures("event_loop") # ensure we have pytest_asyncio installed
@pytest.mark.skipif(os.environ.get('USE_ASYNCIO', False) is False, reason="Only for asyncio")
class Test(TestCase):

@pytest.mark.asyncio(forbid_global_loop=True)
Expand Down
6 changes: 3 additions & 3 deletions autobahn/wamp/test/test_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def test_publish(self):
@inlineCallbacks
def test_publish_outstanding_errors(self):
handler = ApplicationSession()
transport = MockTransport(handler)
MockTransport(handler)

# this publish will "hang" because 'noreply.' URI is
# handled specially in MockTransport; so this request will
Expand All @@ -219,7 +219,7 @@ def test_publish_outstanding_errors(self):
@inlineCallbacks
def test_publish_outstanding_errors_async_errback(self):
handler = ApplicationSession()
transport = MockTransport(handler)
MockTransport(handler)
error_d = Deferred()

# this publish will "hang" because 'noreply.' URI is
Expand All @@ -239,7 +239,7 @@ def errback(fail):
# "leave" the session, which should trigger errbacks on
# all outstanding requests.
details = types.CloseDetails(reason=u'testing', message=u'how are you?')
d = handler.onLeave(details)
handler.onLeave(details)

# since our errback is async, onLeave should not have
# completed yet but we should have already failed the
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
'sphinxcontrib-spelling>=2.1.2', # BSD
'sphinx_rtd_theme>=0.1.9', # BSD
'pytest_asyncio', # Apache 2.0
'pytest-aiohttp', # Apache 2.0
'awscli', # Apache 2.0
'qualname', # BSD
]
Expand Down Expand Up @@ -174,7 +175,7 @@ def run_tests(self):
platforms='Any',
install_requires=[
'six>=1.10.0', # MIT license
'txaio>=2.6.1', # MIT license
'txaio>=2.7.0', # MIT license
],
extras_require={
'all': extras_require_all,
Expand Down
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ deps =
py34-asyncio: pytest_asyncio
py35-asyncio: pytest_asyncio

; aiohttp requires Python 3.4.2+
; py34-asyncio: pytest-aiohttp
; py35-asyncio: pytest-aiohttp

commands =
sh -c "which python"
python -V
Expand Down

0 comments on commit 731228a

Please sign in to comment.