2.0.0a4
Pre-release
Pre-release
-
Allow
...in fixed argument positions as an ad-hocanymatcher.
Trailing positional...keeps its existing "rest" semantics. -
Expanded
mock({...})constructor shorthands. Refer https://mockito-python.readthedocs.io/en/latest/mock-shorthands.html -
Added chained stubbing and expectations across call/property hops, e.g.
when(cat).meow().purr().thenReturn(...),when(User).query.filter_by(...).first(), and
expect(cat, times=1).meow().purr(), including cleanup that preserves sibling chain branches. -
BREAKING: Stubs for the same method are now sorted by specificity. #110Rolled back in a5.Same-ish are for example
when(os.path).exists(...).thenCallOriginalImplementation() when(os.path).exists('.flake8').thenReturn(False)