[issue21270] unittest.mock.call object has inherited count method

2014-09-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5660c1bdc2b6 by Kushal Das in branch 'default':
Closes #21270 : We now override tuple methods in mock.call objects.
https://hg.python.org/cpython/rev/5660c1bdc2b6

--
nosy: +python-dev
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21270] unittest.mock.call object has inherited count method

2014-09-16 Thread Kushal Das

Kushal Das added the comment:

Uploading the second version of the patch.

--
Added file: http://bugs.python.org/file36630/issue21270_v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21270] unittest.mock.call object has inherited count method

2014-09-11 Thread Michael Foord

Michael Foord added the comment:

Thanks for this Kushal. It's not quite right though, count and index need to do 
the same as other attributes looked up with __getattr__. In fact delegating to 
__getattr__ is probably the easiest way of achieving that. (With the current 
patch the calls will be incorrect for call.foo.index() or similar I believe.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21270] unittest.mock.call object has inherited count method

2014-09-09 Thread Kushal Das

Kushal Das added the comment:

Forgot to attach the patch. Includes NEWS entry. Overriden methods count() and 
index().

--
keywords: +patch
Added file: http://bugs.python.org/file36581/issue21270.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21270] unittest.mock.call object has inherited count method

2014-07-08 Thread Michael Foord

Michael Foord added the comment:

Those are the only ones I think. Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21270] unittest.mock.call object has inherited count method

2014-07-07 Thread Kushal Das

Kushal Das added the comment:

To start with I am overriding count and index method. Do you think this is 
enough?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21270] unittest.mock.call object has inherited count method

2014-04-16 Thread Michael Foord

New submission from Michael Foord:

The unittest.mock.call object inherits methods from tuple that prevent you 
using them as normal call attributes. They should be overridden.

--
assignee: michael.foord
messages: 216587
nosy: kushal.das, michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: unittest.mock.call object has inherited count method
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com