File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Changes
22=======
33
4+ .. _version-1.5.0:
5+
6+ 1.5.0
7+ =====
8+ :release-date: 2016-10-28 03:36 p.m. PDT
9+ :release-by: Ask Solem
10+
11+ - Pytest: When decorating classes using the ``skip.*`` and ``mock.*``
12+ decorators, these now augment ``cls.setup``/``cls.teardown`` instead of
13+ ``cls.setup_method``/``cls.teardown_method``.
14+
15+ It's a bit hard to find in the pytest documentation, but pytest
16+ will always call test_cls.setup and test_cls.teardown.
17+
18+ - Pytest: Adds ``patching.object``.
19+
20+ This works exactly like :func:`unittest.mock.patch.object`,
21+ you give it an object and an attribute name, and it will patch
22+ that attribute on the object. It also supports the same arguments
23+ and extra options.
24+
25+ Example:
26+
27+ .. code-block:: python
28+
29+ @pytest.fixture
30+ def channel(patching):
31+ c = Channel()
32+ patching(c, 'connect')
33+ return c
34+
435.. _version-1.4.0:
536
6371.4.0
You can’t perform that action at this time.
0 commit comments