Skip to content

Commit

Permalink
Added tox support
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Medina Toledo committed Nov 16, 2016
1 parent cda3b3a commit 60977df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aioamqp/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ def __init__(self, queue: asyncio.Queue, consumer_tag):
self._stoped = False

if PY35:
async def __aiter__(self):
@asyncio.coroutine
def __aiter__(self):
return self

async def __anext__(self):
@asyncio.coroutine
def __anext__(self):
if not self._stoped:
self.message = await self._queue.get()
self.message = yield from self._queue.get()
if isinstance(self.message, StopIteration):
self._stoped = True
raise StopAsyncIteration()
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
envlist = py33, py34, py35
skipsdist = true


[testenv]
whitelist_externals = bash
deps =
-rrequirements_dev.txt
commands =
nosetests

1 comment on commit 60977df

@dzen
Copy link
Contributor

@dzen dzen commented on 60977df Nov 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should go in another PR, to avoid having a huge PR with multiples changes.

Please sign in to comment.