asynctest icon indicating copy to clipboard operation
asynctest copied to clipboard

Enhance the standard unittest package with features for testing asyncio libraries

Results 52 asynctest issues
Sort by recently updated
recently updated
newest added

New `async_timeout` decorator. ```python class TimedOutTestCase(TestCase): @async_timeout async def test_default_timeout(self): await asyncio.sleep(999, loop=self.loop) @async_timeout(seconds=1) async def test_custom_timeout(self): await asyncio.sleep(999, loop=self.loop)

Not entirely sure why, but without this patch, the stacktraces are absolutely useless: Without the wrapper: ``` ====================================================================== ERROR: test (test.books.ReadyWithoutContent) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/arthur/Documents/reaaad/redkeep/.venv/lib/python3.6/site-packages/asynctest/case.py", line...

It's awesome to have a tutorial! At the same time, I feel that `unittest` framework's time has passed (not everyone agrees, it's just my opinion) and we're happily using `pytest`...

Hi @Martiusweb , First of all thanks for this library. This has really helped in unit testing with aiohttp. I faced an issue while running parameterized testing using [ddt](https://github.com/datadriventests/ddt). Let's...

Sample interpreter session: ``` >>> import asynctest >>> class Foo: ... async def bar(): ... pass ... >>> f = Foo() >>> m = asynctest.Mock(wraps=f) >>> type(m.bar) >>> m =...

I want to assert that an `ensure_future` call is being called with a specific coroutine. The fast way is: ```python with patch('asyncio.ensure_future') as ensure_future: await whatever() # it has the...

Running tests with PYTHONASYNCIODEBUG=1 generates a lot of warning messages. We should check if they're generated by asynctest or by the test, and fix them in both cases.

Documentation is pushed on readthedocs, but the latest commit on master is always the one used for the documentation. It means that the documentation may describe unreleased features, and it's...

documentation

I downloaded the asynctest zipfile on Mar 14/2018 5:30P EDT, and found a failing unit test [pyatsve_36] nostg-ott-vm-8:639> python setup.py test running test running egg_info writing asynctest.egg-info/PKG-INFO writing dependency_links to...

I am currently trying to package asynctest-0.12.2 for Gentoo Linux and I am running into a test error: ``` ====================================================================== ERROR: test_events_watched_outside_test_are_ignored (test.test_selector.Test_fail_on_active_selector_callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File...