<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/unittest, branch revert-11318-fast-enum</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>Fix mock_open docstring to use readline (#11176)</title>
<updated>2018-12-20T16:00:21+00:00</updated>
<author>
<name>Xtreak</name>
<email>tirkarthi@users.noreply.github.com</email>
</author>
<published>2018-12-20T16:00:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=71f82a2f2085464f5ec99c16bce57bd1631733bd'/>
<id>71f82a2f2085464f5ec99c16bce57bd1631733bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)</title>
<updated>2018-12-17T10:30:34+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-12-17T10:30:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=8db5b54463118e5eb60cb3582e3108623f01f5df'/>
<id>8db5b54463118e5eb60cb3582e3108623f01f5df</id>
<content type='text'>
TextTestRunner of unittest.runner now uses time.perf_counter() rather
than time.time() to measure the execution time of a test: time.time()
can go backwards, whereas time.perf_counter() is monotonic.

Similar change made in libregrtest, pprint and random.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TextTestRunner of unittest.runner now uses time.perf_counter() rather
than time.time() to measure the execution time of a test: time.time()
can go backwards, whereas time.perf_counter() is monotonic.

Similar change made in libregrtest, pprint and random.</pre>
</div>
</content>
</entry>
<entry>
<title>Add test for double patching instance methods (#11085)</title>
<updated>2018-12-12T07:56:35+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2018-12-12T07:56:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5a718e918db6211b633a7afb2bf537eb5b56cb1b'/>
<id>5a718e918db6211b633a7afb2bf537eb5b56cb1b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11048)</title>
<updated>2018-12-12T07:54:54+00:00</updated>
<author>
<name>Xtreak</name>
<email>tirkarthi@users.noreply.github.com</email>
</author>
<published>2018-12-12T07:54:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f7fa62ef4422c9deee050a794fd8504640d9f8f4'/>
<id>f7fa62ef4422c9deee050a794fd8504640d9f8f4</id>
<content type='text'>
* Fix partial and partial method signatures in mock

* Add more calls

* Add NEWS entry

* Use assertEquals and fix markup in NEWS

* Refactor branching and add markup reference for functools

* Revert partial object related changes and fix pr comments
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix partial and partial method signatures in mock

* Add more calls

* Add NEWS entry

* Use assertEquals and fix markup in NEWS

* Refactor branching and add markup reference for functools

* Revert partial object related changes and fix pr comments
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35330:  Don't call the wrapped object if `side_effect` is set (GH10973)</title>
<updated>2018-12-08T11:25:02+00:00</updated>
<author>
<name>Mario Corchero</name>
<email>mariocj89@gmail.com</email>
</author>
<published>2018-12-08T11:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f05df0a4b679d0acfd0b1fe6187ba2d553b37afa'/>
<id>f05df0a4b679d0acfd0b1fe6187ba2d553b37afa</id>
<content type='text'>
* tests: Further validate `wraps` functionality in `unittest.mock.Mock`

Add more tests to validate how `wraps` interacts with other features of
mocks.

* Don't call the wrapped object if `side_effect` is set

When a object is wrapped using `Mock(wraps=...)`, if an user sets a
`side_effect` in one of their methods, return the value of `side_effect`
and don't call the original object.

* Refactor what to be called on `mock_call`

When a `Mock` is called, it should return looking up in the following
order: `side_effect`, `return_value`, `wraps`. If any of the first two
return `mock.DEFAULT`, lookup in the next option.

It makes no sense to check for `wraps` returning default, as it is
supposed to be the original implementation and there is nothing to
fallback to.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests: Further validate `wraps` functionality in `unittest.mock.Mock`

Add more tests to validate how `wraps` interacts with other features of
mocks.

* Don't call the wrapped object if `side_effect` is set

When a object is wrapped using `Mock(wraps=...)`, if an user sets a
`side_effect` in one of their methods, return the value of `side_effect`
and don't call the original object.

* Refactor what to be called on `mock_call`

When a `Mock` is called, it should return looking up in the following
order: `side_effect`, `return_value`, `wraps`. If any of the first two
return `mock.DEFAULT`, lookup in the next option.

It makes no sense to check for `wraps` returning default, as it is
supposed to be the original implementation and there is nothing to
fallback to.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-33747: Avoid mutating the global sys.modules dict in unittest.mock tests (GH-8520)</title>
<updated>2018-12-07T23:30:42+00:00</updated>
<author>
<name>Anirudha Bose</name>
<email>ani07nov@gmail.com</email>
</author>
<published>2018-12-07T23:30:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=3cf74384b53b998fa846dc2590cedf9ad2a0d5fd'/>
<id>3cf74384b53b998fa846dc2590cedf9ad2a0d5fd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused function in `testmock/support.py` (GH-10975)</title>
<updated>2018-12-06T17:05:46+00:00</updated>
<author>
<name>Mario Corchero</name>
<email>mariocj89@gmail.com</email>
</author>
<published>2018-12-06T17:05:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=20428527a7c188d988d20b267cfef58da10b0fc9'/>
<id>20428527a7c188d988d20b267cfef58da10b0fc9</id>
<content type='text'>
The function is never imported and the implementation is actually buggy.
As `warnings.catch_warnings` is not imported here.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function is never imported and the implementation is actually buggy.
As `warnings.catch_warnings` is not imported here.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (#10873)</title>
<updated>2018-12-04T09:08:45+00:00</updated>
<author>
<name>Andrew Dunai</name>
<email>andunai@gmail.com</email>
</author>
<published>2018-12-04T09:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=e63e617ebbe481c498bdf037a62e09f4f9f3963f'/>
<id>e63e617ebbe481c498bdf037a62e09f4f9f3963f</id>
<content type='text'>
Fix minor typo in test function name.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix minor typo in test function name.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35226: Fix equality for nested unittest.mock.call objects. (#10555)</title>
<updated>2018-12-03T21:31:37+00:00</updated>
<author>
<name>Chris Withers</name>
<email>chris@withers.org</email>
</author>
<published>2018-12-03T21:31:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68'/>
<id>8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68</id>
<content type='text'>
Also refactor the call recording imolementation and add some notes
about its limitations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also refactor the call recording imolementation and add some notes
about its limitations.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32153: Add unit test for create_autospec with partial function returned in getattr (#10398)</title>
<updated>2018-12-03T07:58:15+00:00</updated>
<author>
<name>Xtreak</name>
<email>tirkarthi@users.noreply.github.com</email>
</author>
<published>2018-12-03T07:58:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=c667b094ae37799a7e42ba5cd2ad501cc7920888'/>
<id>c667b094ae37799a7e42ba5cd2ad501cc7920888</id>
<content type='text'>
* Add create_autospec with partial function returned in getattr

* Use self.assertFalse instead of assert

* Use different names and remove object
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add create_autospec with partial function returned in getattr

* Use self.assertFalse instead of assert

* Use different names and remove object
</pre>
</div>
</content>
</entry>
</feed>
