[issue21820] unittest: unhelpful truncating of long strings.

2014-06-21 Thread Chris Withers
New submission from Chris Withers: This code, prior to 3.4: from testfixtures import Comparison as C class AClass: def __init__(self,x,y=None): self.x = x if y: self.y = y def __repr__(self): return ''+self.__class__.__name__

[issue18996] unittest: more helpful truncating long strings

2014-06-21 Thread Chris Withers
Chris Withers added the comment: Okay, opened [issue21820]. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18996 ___ ___ Python-bugs-list

[issue21820] unittest: unhelpful truncating of long strings.

2014-06-21 Thread Chris Withers
Chris Withers added the comment: Agreed, but even for strings, there really should be an API to control this... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21820

[issue21820] unittest: unhelpful truncating of long strings.

2014-06-22 Thread Chris Withers
Chris Withers added the comment: If I worked up a patch that: - made sure this truncation wasn't used for non-strings - added a class-attribute control for the truncation Would it be well received? -- ___ Python tracker rep...@bugs.python.org http

[issue21820] unittest: unhelpful truncating of long strings.

2014-06-24 Thread Chris Withers
Chris Withers added the comment: No, it would not be enough. Please see the report above, the repr of non-strings may be large, but it's often intended that way and all of the string should be displayed. It really is a shame that no API was provided to control this behaviour. I actually

testfixtures 4.1.2 Released!

2015-01-30 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.1.2. This is a bugfix release that fixes the following: - Clarify documentation for name parameter to LogCapture. - ShouldRaise now shows different output when two exceptions have the same representation but stiff differ. - Fix

xlwt 1.0.0 released!

2015-04-15 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 1.0.0. This release contains the following: - Python 3 support. - An initial set of unit tests. - An initial set of Sphinx documentation. - Move to setuptools for packaging. - Wire up Travis, Coveralls and ReadTheDocs. - Allow longs as

testfixtures 4.2.0 Released!

2015-08-11 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.2.0. This is a feature release that fixes the following: - A new MockPopen mock for use when testing code that uses subprocess.Popen. - ShouldRaiss now subclasses object, so that subclasses of it may use super(). - Support

xlrd 0.9.4 released!

2015-07-15 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.4: http://pypi.python.org/pypi/xlrd/0.9.4 This release includes the following changes: - Automated tests are now run on Python 3.4 - Use ElementTree.iter() if available, not deprecated getiterator() when parsing xlsx files. - Fix

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-03 Thread Chris Withers
Chris Withers added the comment: Indeed, I guess Venusian will get confused, but not sure thats solvable as there will be obvious bugs indicating that call shouldn't be imported at module-level. This does feel like the problem is actually with inspect.unwrap: there's evidence of an attempt

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers
New submission from Chris Withers: The following results in an infinite loop: >>> from inspect import unwrap >>> from unittest.mock import call >>> unwrap(call) This can occur when you use doctest.DocTestSuite to load doc tests from a module where unittest.

testfixtures 4.4.0 Released!

2015-11-01 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.4.0. This is a feature release that adds the following: - Add support for labelling the arguments passed to compare(). - Allow expected and actual keyword parameters to be passed to compare(). - Fix "TypeError: unorderable

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers
Chris Withers added the comment: A naive solution is to chat unittest.mock._Call's __getattr__ to be as follows: def __getattr__(self, attr): if attr == '__wrapped__': raise AttributeError('__wrapped__') if self.name is None: return _Call(name=attr, from_kall=False

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-02 Thread Chris Withers
Chris Withers added the comment: Ah yes, I can see how Venusian would get confused. How about making the check a more generic: if attr.startswith('__'): raise AttributeError(attr) ? That said, why does call have a __getattr__? Where is that intended to be used

testfixtures 4.3.3 Released!

2015-09-15 Thread Chris Withers
Sorry, the move to using Travis CI was not without bumps, and we're now on 4.3.3, which should be correctly built, including docs up on http://testfixtures.readthedocs.org/. Apologies for the noise... Chris On 15/09/2015 14:54, Chris Withers wrote: Hi All, I'm pleased to announce

testfixtures 4.3.0 Released!

2015-09-15 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.3.0. This is a feature release that adds the following: - Add TempDirectory.compare with a cleaner, more explicit API that allows comparison of only the files in a temporary directory. - Deprecate TempDirectory.check,

mush 2.0 released! - Type-based dependency injection for scripts

2015-12-11 Thread Chris Withers
Hi All, I'm very happy to announce a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release is a re-write dropping all the heuristic callable ordering in favour of building up

testfixtures 4.7.0 Released!

2015-12-10 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.7.0. Since 4.5.1, the following have been added: - Add the ability to pass raises=False to compare() to just get the resulting message back rather than having an exception raised. - Fix a bug that mean symlinked directories

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-18 Thread Chris Withers
Chris Withers added the comment: Cool, what needs to happen for __wrapped__ in to be blacklisted in call? Separately, inspect.unwrap probably needs to use something less fragile than a set of ids to track whether it's stuck in a loop. What is the actual usecase for __wrapped__ how deeply

testfixtures 4.5.1 Released!

2015-11-22 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.5.1. This release that contains: - LogCapture, OutputCapture and TempDirectory explicitly show what is expected versus actual when reporting differences as of 4.5.0. - The 4.5.1 release contains a bugfix where OutputCapture

xlrd 1.0.0 released!

2016-06-02 Thread Chris Withers
Ugh, and once again, this time with a corrected title... On 02/06/2016 18:56, Chris Withers wrote: Hi All, Well, I've finally called it and tagged current master of xlrd as 1.0.0: http://pypi.python.org/pypi/xlrd/1.0.0 This release includes the following changes since the last release

xlrd 0.9.4 released!

2016-06-02 Thread Chris Withers
Hi All, Well, I've finally called it and tagged current master of xlrd as 1.0.0: http://pypi.python.org/pypi/xlrd/1.0.0 This release includes the following changes since the last release: - Official support, such as it is, is now for 2.6, 2.7, 3.3+ - Fixes a bug in looking up non-lowercase

xlwt 1.1.1 released!

2016-06-02 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 1.1.1. This release contains the following: - Fix SST BIFF record in Python 3. - Fix for writing ExternSheetRecord in Python 3. - Add the ability to insert bitmap images from buffers as well as files. - Official support for Python 3.5.

errorhandler 2.0.0 Released!

2016-06-06 Thread Chris Withers
Hi All, errorhandler is a tiny but useful logging handler for the python logging framework. It lets you tell when logging above a certain level has occurred, even if it's not in code you can control. I'm pleased to announce the release of errorhandler 2.0.0 featuring the following: -

[issue27244] print(';;') fails in pdb with SyntaxError

2016-06-06 Thread Chris Withers
New submission from Chris Withers: This doesn't seem right: (Pdb) ';;' *** SyntaxError: EOL while scanning string literal *** SyntaxError: EOL while scanning string literal (Pdb) p ';;' *** SyntaxError: EOL while scanning string literal *** SyntaxError: EOL while scanning string literal (Pdb

xlwt 1.1.2 released!

2016-06-08 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 1.1.2. This release contains the following: - Fix failure in style compression under Python 3. - Documentation tweaks. If you find any problems, please ask about them on the python-ex...@googlegroups.com list, or submit an issue on GitHub:

xlutils 2.0.0 released!

2016-06-08 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlutils 2.0.0: http://pypi.python.org/pypi/xlutils/2.0.0 This release has a couple of small changes: - Updated documentation. - Move to virtualenv/pip based development. - Move to Read The Docs for documentation. - Use Travis CI for testing

testfixtures 4.8.0 Released!

2016-02-02 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.8.0 featuring the following: - More succinct mocking with Replacer: For setUp usage: class MyTests(TestCase): def setUp(self): replace = Replacer() replace('x.y.z', Mock())

testfixtures 4.8.0 Released!

2016-02-18 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.9.0 featuring the following: - Suffixes and well as prefixes for compare() assertion errors. - Appropriate metadata to indicate official support for Python 3.5. Thanks for Felix Yan for the metadata patch. Thanks to Wim Glenn

Re: [TIP] testfixtures 4.8.0 Released!

2016-02-19 Thread Chris Withers
On 18/02/2016 22:35, Mark Lawrence wrote: On 18/02/2016 22:27, Chris Withers wrote: Hi All, I'm pleased to announce the release of testfixtures 4.9.0 featuring the following: 4.8.0 or 4.9.0, that is the question, or should it be just how good is your version control? :) Gah, I really

testfixtures 4.10.0 Released!

2016-05-17 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.10.0 featuring the following: - Fixed examples in documentation broken in 4.5.1. - Add RangeComparison for comparing against values that fall in a range. - Add MockPopen.set_default(). Thanks to Asaf Peleg for the

testfixtures 4.10.1 Released!

2016-09-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.10.1 featuring the following: - Better docs for TempDirectory.compare(). - Remove the need for expected paths supplied to TempDirectory.compare() to be in sorted order. - Document a good way of restoring stdout when in a

testfixtures 4.12.0 Released!

2016-10-18 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.12.0 featuring the following: - Add support for specifying a callable to extract rows from log records when using LogCapture(). - Add support for recursive comparison of log messages with LogCapture(). The package is on PyPI

mush 2.4.0 released! - Type-based dependency injection for scripts

2016-11-17 Thread Chris Withers
Hi All, I'm very happy to announce the a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release includes: - Add support for cloning depending on what label was used to add

testfixtures 4.13.0 Released!

2016-11-02 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.13.0 featuring the following: - Add support to compare() for ignoring broken __eq__ implementations, such as that found in the Django ORM! The package is on PyPI and a full list of all the links to docs, issue trackers and the

testfixtures 4.11.0 Released!

2016-10-12 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.10.1 featuring the following: - Allow the attributes returned in LogCapture.actual() rows to be specified. - Allow a default to be specified for encoding in TempDirectory.read() and TempDirectory.write(). The package is on

Re: [TIP] testfixtures 4.11.0 Released!

2016-10-12 Thread Chris Withers
*sigh*, it's 4.11.0 that was released with these changes... On 12/10/2016 17:06, Chris Withers wrote: Hi All, I'm pleased to announce the release of testfixtures 4.10.1 featuring the following: - Allow the attributes returned in LogCapture.actual() rows to be specified. - Allow a default

testfixtures 5.1.0 released!

2017-06-08 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 5.1.0 featuring the following: * Added support for including non-editable fields to the|comparer|used by|compare()|when comparing/django/|Model|instances. The package is on PyPI and a full list of all the links to docs, issue

Sybil 1.0.0 Released!

2017-05-26 Thread Chris Withers
Hi All, I'm pleased to announce the first release of Sybil, a library to help you test the examples in your documents. For example, given the following Sphinx source file: Sample Documentation Let's put something in the Sybil document's namespace: ..

Re: Sybil 1.0.0 Released!

2017-05-30 Thread Chris Withers
On 27/05/2017 00:56, Skip Montanaro wrote: On Fri, May 26, 2017 at 2:34 AM, Chris Withers <ch...@simplistix.co.uk <mailto:ch...@simplistix.co.uk>> wrote: The package is on PyPI and a full list of all the links to docs, issue trackers and the like can be found here

Sybil 1.0.1 Released!

2017-05-30 Thread Chris Withers
Hi All, I'm pleased to announce a new release of Sybil, a library to help you test the examples in your documentation. This release fixes a bug where unicode and byte literals weren't corrected in doctest tracebacks, event when FIX_BYTE_UNICODE_REPR was specified. The package is on PyPI

testfixtures 5.0.0 released!

2017-06-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 5.0.0 featuring the following: * Move fromnose topytest for running tests. * Switch frommanuel tosybil

mush 2.7 released! - Type-based dependency injection for scripts

2017-09-07 Thread Chris Withers
Hi All, I'm very happy to announce the a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release includes: - Add support for using Python 3 type annotations to specify requirements

xlrd 1.1.0 and xlwt 1.3.0 released!

2017-08-22 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 1.1.0 and xlwt 1.3.0. Please consult their change logs on readthedocs.org to see what's new. As before, I will be upfront and say you should no longer be using these unless libraries unless you have a particular need to work with .xls

testfixtures 5.2.0 released!

2017-09-03 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 5.2.0 featuring the following: * test_datetime and test_time now accept a [1]datetime instance during instantiation to set the initial value. * test_date now accepts a [2]date instance during instantiation

MailingLogger 5.0.0 Released!

2018-05-30 Thread Chris Withers
Hi All, I'm pleased to announce the release of MailingLogger 5.0.0. Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the

testfixtures 6.0.2 released - important bug fix!

2018-05-02 Thread Chris Withers
Hi All, I'm afraid I've found quite a serious regression in the 6.x series of testfixtures releases: Objects that had neither __dict__ nor __slots__ would always be considered equal by compare(). I hit this comparing datetimes, but this would also affect types provides by extensions in

testfixtures 5.3.0 released!

2017-10-28 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 5.3.0 featuring the following: * Add pytest traceback hiding for|TempDirectory.compare()|. * Add warnings that|log_capture()|,|tempdir()|and|replace()|are not currently compatible with pytest’s fixtures mechanism. * Better

MailingLogger 4.0.0 Released!

2018-01-26 Thread Chris Withers
Only 4 years later than planned, I'm pleased to announce a new release of MailingLogger... Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The

testfixtures 6.0.0 released!

2018-03-27 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 6.0.0 featuring the following: * |compare()| will now handle objects that do not natively support equality or inequality and will treat these

[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Chris Withers
New submission from Chris Withers : $ python3 Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from unittest.mock import c

[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Chris Withers
Chris Withers added the comment: I don't think the getattr(self, 'parent', None) is necessary, the attribute is always there and None == None ;-) I reckon this will work: if self.parent != other.parent): return True ...but obviously, we'd add some more tests to the suite to make sure

[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Chris Withers
Chris Withers added the comment: I'm chatting with Michael already (on Facebook of all places), and I use this feature heavily and deeply, being one of the people who originally requested it. I'm both happy and capable of seeing this through, so no need for anyone else to dive

[issue35226] mock.call equality surprisingly broken

2018-11-14 Thread Chris Withers
Chris Withers added the comment: Assuming the PR is merged, what do I need to do for 3.7 and 3.6 backports? There's no doubt a doc for this somewhere, so please just point me at it :-) -- ___ Python tracker <https://bugs.python.org/issue35

[issue20239] Allow repeated deletion of unittest.mock.Mock attributes

2019-01-21 Thread Chris Withers
Chris Withers added the comment: New changeset 222d303ade8aadf0adcae5190fac603bdcafe3f0 by Chris Withers (Pablo Galindo) in branch 'master': bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (#11057) https://github.com/python/cpython/commit

[issue20239] Allow repeated deletion of unittest.mock.Mock attributes

2019-01-21 Thread Chris Withers
Chris Withers added the comment: New changeset d358a8cda75446a8e0b5d99149f709395d5eae19 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (GH-11629) https://github.com/python/cpython/commit

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Chris Withers
Chris Withers added the comment: Before we get too far: what's the use case for this double patching? -- ___ Python tracker <https://bugs.python.org/issue26

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2018-12-10 Thread Chris Withers
Chris Withers added the comment: More tests are generally a good thing, so go for it :-) -- ___ Python tracker <https://bugs.python.org/issue24928> ___ ___ Pytho

[issue28054] Diff for visually comparing actual with expected in mock.assert_called_with.

2018-12-10 Thread Chris Withers
Chris Withers added the comment: This is a tricky one as there's plenty of prior art, with pytest's assertion rewriting [1], testfixtures compare [2] and the stuff that unittest already does [3]. I don't think any solution should rely on a TestCase being used as pytest, which is the most

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-11 Thread Chris Withers
Chris Withers added the comment: New changeset f7fa62ef4422c9deee050a794fd8504640d9f8f4 by Chris Withers (Xtreak) in branch 'master': bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11048) https://github.com/python/cpython/commit

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-12 Thread Chris Withers
Change by Chris Withers : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-11 Thread Chris Withers
Change by Chris Withers : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-12 Thread Chris Withers
Chris Withers added the comment: New changeset 6a12931c9cb5d472fe6370dbcd2bde72f34dddb4 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11125) https://github.com/python/cpython/commit

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-12 Thread Chris Withers
Chris Withers added the comment: Yep! Good catch :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Chris Withers
Chris Withers added the comment: Ah, yeah, I can see the blanket patch and a more local patch in a monorepo being a thing, cool, let's have a look! -- ___ Python tracker <https://bugs.python.org/issue26

[issue35500] Align expected and actual calls on mock.assert_called_with error message

2018-12-24 Thread Chris Withers
Change by Chris Withers : -- Removed message: https://bugs.python.org/msg332462 ___ Python tracker <https://bugs.python.org/issue35500> ___ ___ Python-bugs-list m

[issue35500] Align expected and actual calls on mock.assert_called_with error message

2018-12-24 Thread Chris Withers
Change by Chris Withers : -- Removed message: https://bugs.python.org/msg332464 ___ Python tracker <https://bugs.python.org/issue35500> ___ ___ Python-bugs-list m

[issue35226] mock.call equality surprisingly broken

2018-11-27 Thread Chris Withers
Chris Withers added the comment: Éric, doesn't look like I can add labels, what needs to happen for me to do so? (I was/am a core developer, just an extremely inactive one ;-), but happy to jump through whatever hoops necessary... ) -- ___ Python

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
Chris Withers added the comment: New changeset 70ca3fce9fe2bdd7bf97d5fe1299cfa5e32b3ad4 by Chris Withers (Miss Islington (bot)) in branch '3.6': bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (GH-10873) https://github.com/python/cpython/commit

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
Chris Withers added the comment: New changeset 12735c14134082584b899308af8dd8fcc9f15696 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (GH-10873) (#10887) https://github.com/python/cpython

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
Change by Chris Withers : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35357> ___ ___ Pyth

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
Chris Withers added the comment: New changeset e63e617ebbe481c498bdf037a62e09f4f9f3963f by Chris Withers (Andrew Dunai) in branch 'master': bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (#10873) https://github.com/python/cpython/commit

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
Chris Withers added the comment: New changeset f05df0a4b679d0acfd0b1fe6187ba2d553b37afa by Chris Withers (Mario Corchero) in branch 'master': bpo-35330: Don't call the wrapped object if `side_effect` is set (GH10973) https://github.com/python/cpython/commit

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
Change by Chris Withers : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
Chris Withers added the comment: New changeset ee2c5a8e2dcf662048dbcf4e49af9b4aaf81f7d3 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11035) https://github.com/python/cpython/commit

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
Chris Withers added the comment: New changeset 12b9fb603eea9298c835bae5b8742db4fa52892e by Chris Withers (Miss Islington (bot)) in branch '3.6': bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11034) https://github.com/python/cpython/commit

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-03 Thread Chris Withers
Chris Withers added the comment: Not sure I follow the second option, I was thinking of just _mock_parent and _mock_name when I logged this. Happy to see a PR for either though! -- ___ Python tracker <https://bugs.python.org/issue35

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-03 Thread Chris Withers
Chris Withers added the comment: Go for it! :-) -- ___ Python tracker <https://bugs.python.org/issue35357> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
Chris Withers added the comment: New changeset 8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68 by Chris Withers in branch 'master': bpo-35226: Fix equality for nested unittest.mock.call objects. (#10555) https://github.com/python/cpython/commit/8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-11-29 Thread Chris Withers
New submission from Chris Withers : While working on https://bugs.python.org/issue35226, I stumbled upon this: >>> from unittest.mock import call >>> call.parent() Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not cal

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
Chris Withers added the comment: New changeset e8f9e4785caeef8a68bb7859280e91a4cb424b79 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555) https://github.com/python/cpython/commit

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
Chris Withers added the comment: New changeset 67e6136a6d5c07141d4dba820c450a70db7aedd5 by Chris Withers (Miss Islington (bot)) in branch '3.6': bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555) https://github.com/python/cpython/commit

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
Change by Chris Withers : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35226> ___ ___ Pyth

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-03 Thread Chris Withers
Chris Withers added the comment: xtreak - great to see action on this! First step would be to add a unit test for the failure case I reported. I like the tests you have too, but would be good to see the specific failure case covered too. Beyond that, if we can get all the the new tests

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-03 Thread Chris Withers
Chris Withers added the comment: New changeset 1ef06c62d3c05cbba6448c56af30a09c551c9ec2 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-32153: Add unit test for create_autospec with partial function returned in getattr (GH-10398) (#10855) https://github.com/python/cpython

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-02 Thread Chris Withers
Chris Withers added the comment: New changeset c667b094ae37799a7e42ba5cd2ad501cc7920888 by Chris Withers (Xtreak) in branch 'master': bpo-32153: Add unit test for create_autospec with partial function returned in getattr (#10398) https://github.com/python/cpython/commit

testfixtures 6.4.0 released - important bug fix! (again)

2018-12-19 Thread Chris Withers
Hi All, I'm afraid I found quite a [1]serious problem with unittest.mock.call objects that is important for users of testfixtures' MockPopen helper. This release includes a monkey patch to fix that issue as well as a facade over both unittest.mock and the rolling backport on pypi,

[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-25 Thread Chris Withers
Chris Withers added the comment: New changeset ea199b90bb61866cd3c2f154341d1eb0d5c4a710 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35512: Resolve string target to patch.dict decorator during function call GHGH-12000 (#12021) https://github.com/python/cpython/commit

[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-24 Thread Chris Withers
Chris Withers added the comment: New changeset a875ea58b29fbf510f9790ae1653eeaa47dc0de8 by Chris Withers (Xtreak) in branch 'master': bpo-35512: Resolve string target to patch.dict decorator during function call GH#12000 https://github.com/python/cpython/commit

[issue21269] Provide args and kwargs attributes on mock call objects

2019-03-22 Thread Chris Withers
Chris Withers added the comment: New changeset b0df45e55dc8304bac0e3cad0225472b84190964 by Chris Withers (Kumar Akshay) in branch 'master': bpo-21269: Provide args and kwargs attributes on mock call objects GH11807 https://github.com/python/cpython/commit

[issue37107] ensurepip --upgrade doesn't change the version of pip used by venv

2019-05-31 Thread Chris Withers
New submission from Chris Withers : $ python3.7 -m ensurepip --upgrade Looking in links: /var/folders/m6/tsd59qsj7pd_lldh4mhwh6khgn/T/tmpqk_vncev Requirement already up-to-date: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (39.0.1

[issue37107] ensurepip --upgrade doesn't change the version of pip used by venv

2019-06-09 Thread Chris Withers
Chris Withers added the comment: I don't suppose there's any chance we can treat the misnaming of these options as the bugs they feel like, so so fix them for 3.7+, rather than having people battle on with the confusion for another 3+ years until 3.9 is mainstream

mock 3.0.0 released

2019-05-02 Thread Chris Withers
Hi All, I'm pleased to announce the release of mock 3.0.0: https://pypi.org/project/mock/ This brings to rolling backport up to date with cpython master. It's been a few years since the last release, so I'd be surprised if there weren't some problems. If you hit any issues, please pin to

drop jython support in mock backport?

2019-04-30 Thread Chris Withers
Hi All, If you need Jython support in the mock backport, please shout now: https://github.com/testing-cabal/mock/issues/453 cheers, Chris -- https://mail.python.org/mailman/listinfo/python-list

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-05-07 Thread Chris Withers
Chris Withers added the comment: New changeset 11a8832c98b3db78727312154dd1d3ba76d639ec by Chris Withers (Rémi Lapeyre) in branch 'master': bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) https://github.com/python/cpython/commit

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-05-07 Thread Chris Withers
Chris Withers added the comment: New changeset a6516f89aa0f416c7514ac364bb48ac7d1455487 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) (#13152) https://github.com/python/cpython

[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers
Chris Withers added the comment: We only attempt to set __signature__ on Mocks, so I don't think extensions will be a problem. I do think there's a bit of code smell on that method: it's called _check_* and then changes some attributes, that might be worth fixing

[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers
Chris Withers added the comment: Wow, is this just an issue that the pyside guys need to fix? -- ___ Python tracker <https://bugs.python.org/issue36848> ___ ___

[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers
Chris Withers added the comment: I'm not sure we should try and work around this; hijacking __signature__ python-wide is going to cause a bunch of other problems. My vote would be to just open a bug on the pyside tracker (wherever that is) and close the issue and and on the backport

[issue21820] unittest: unhelpful truncating of long strings.

2019-05-08 Thread Chris Withers
Change by Chris Withers : -- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4 ___ Python tracker <https://bugs.python.org/issue21820> ___ ___ Python-bug

<    1   2   3   4   5   6   >