Ilya Kulakov

Results 232 comments of Ilya Kulakov

The doc say: > Note In CPython, generator-based coroutines (generators decorated with types.coroutine() or asyncio.coroutine()) are awaitables, even though they do not have an __await__() method. Using isinstance(gencoro, Coroutine) for...

There can be existing code like this: ```python isinstance(m, CoroutineMock) ``` and this change should not break it.

One option is to provide a custom metaclass with overridden `__instancecheck__` and `__subclasscheck__` ([PEP 3119](https://www.python.org/dev/peps/pep-3119/)). It might cause the trouble to users who subclassed `CoroutineMock` with a custom metaclasse, but...

@Martiusweb What do you thing about an alternative approach: ``` from warnings import warn class _DeprecatedClassMeta(type): def __new__(cls, name, bases, classdict, *args, **kwargs): alias = kwargs.pop('alias', None) if alias is...

@Martiusweb Hmm, it seems to work for me (Python 3.6.3) with only one test failing: ``` FAIL: test_patch_generator_with_multiple_scopes_on_same_dict (test.test_mock.Test_patch_dict_decorator_coroutine_or_generator_scope) [Outher: GLOBAL, inner: LIMITED] ---------------------------------------------------------------------- Traceback (most recent call last): File...

@Martiusweb Updated the PR to allow running tests via `-m unittest`, `setup.py test` and `pytest` (`setup.py pytest` too if you have pytest-runner installed). Integrated coveralls, but you have to activate...

@Martiusweb For coveralls to work on Appveyor, the `COVERALLS_REPO_TOKEN` has to be set manually after you active the project there.

@Martiusweb Anything missing?

@Martiusweb What do you think about the change?