doubles icon indicating copy to clipboard operation
doubles copied to clipboard

Test doubles for Python.

Results 18 doubles issues
Sort by recently updated
recently updated
newest added

In its current state, `doubles`'s `and_return_future` only returns `concurrent.futures.Future` or `tornado.concurrent.Future`. ```python def _get_future(): try: from concurrent.futures import Future except ImportError: try: from tornado.concurrent import Future except ImportError: raise ImportError(...

# Context Every time I try to mock a function from an external library ([depthai](https://github.com/luxonis/depthai) in my case), I got the following error: ``` ValueError: no signature found for builtin...

`__dict__` is an implementation detail. We should avoid using it. Fixes #93.

Given this setup ``` // models/beetle_juice.py class BeetleJuice: @property def defined_attribute(self): pass def defined_method(self): pass // tests/models/beetle_juice_test.py from doubles import InstanceDouble, allow ``` 1. This raises an doubles.exceptions.VerifyingDoubleError which seems...

It would be nice to know why arguments do not match when there's a single allowance, e.g.: ``` doubles.exceptions.UnallowedMethodCallError: Received unexpected call to '...' on . The supplied arguments (...)...

enhancement
help wanted

```python class Foo(object): @property def bar(self): pass @bar.setter def bar(self, value): pass def do_bar(foo): foo.bar = 3 def test_bar_property(): foo = Foo() allow(foo).bar do_bar(foo) ``` Fails with ``AttributeError``. Besides, it...

bug

It would be nice to be able to check for partial argument match. The `equals` library will still require you to provide all arguments: ```python import equals import a #...

enhancement

Fairly simple to reproduce, try setting an allowance on a function decoratored with `functools.lru_cache`. Need any help fixing it?

bug