[issue21820] unittest: unhelpful truncating of long strings.

2019-12-06 Thread Ella Sharakanski


Ella Sharakanski  added the comment:

Any news on this? I also consider this a bug.

--
nosy: +Ella Sharakanski

___
Python tracker 

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



[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 

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



[issue21820] unittest: unhelpful truncating of long strings.

2019-05-08 Thread Larry Hastings


Larry Hastings  added the comment:

This bug is marked only for 3.4, and 3.4 is now EOL.  Either it should be 
relocated to an active version, or it should be marked wontfix.

--
nosy: +larry

___
Python tracker 

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-10-28 Thread Robert Collins

Changes by Robert Collins robe...@robertcollins.net:


--
nosy: +rbcollins

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Will be enough just to increase default maximal string length (_MAX_LENGTH) to 
say 200? I think we can do this even in a bug fix release for 3.4. We can also 
increase the number of tail characters (_MIN_BEGIN_LEN and _MIN_END_LEN).

I'm against the don't trigger on non-strings, because the repr of non-strings 
can be pretty large.

--

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



[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 consider that a bug, Michael, could it be considered as such 
so that we can fix it in 3.4 rather than having to wait until 3.5 to fix 
the problem?

--

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-24 Thread R. David Murray

R. David Murray added the comment:

For strings, all of the string was not displayed before, either, it was just 
truncated at the end only.  I'm surprised that that didn't apply to non-strings 
as well.  It's the diff output that is supposed to be the full text (if maxDiff 
is None), to my understanding, so it would make sense to me that either the 
whole output should be displayed if there is no diff output (and maxDiff is 
None?), or the reprs should be diffed.

--

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-23 Thread Nick Coghlan

Nick Coghlan added the comment:

It's ultimately up to Michael as the module maintainer, but the class
attribute approach would match the way maxDiff works.

--

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Oh, one point - the don't trigger on non-strings could likely go in a bug
fix release for 3.4, but the flag to turn it off entirely would be a new
feature for 3.5.

--

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-23 Thread Michael Foord

Michael Foord added the comment:

I agree that it looks like a bug that this behaviour is triggering for 
non-strings. There is separate code (which uses maxDiff) for comparing 
collections. 

Switching off the behaviour for 3.4 / 2.7 and a new class attribute for 3.5 is 
a good approach.

--

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



[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://bugs.python.org/issue21820
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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__+''

...

self.assertEqual(
C('testfixtures.tests.test_comparison.AClass',
  y=5, z='missing'),
  AClass(1, 2))

Would give the following output in the failure message:


C(failed):testfixtures.tests.test_comparison.AClass
  x:1 not in Comparison
  y:5 != 2
  z:'missing' not in other
/C != AClass


Now, in 3.4, you get the (rather unhelpful):


C(failed):testfixtures.tests.test_com[79 chars] /C != AClass


It's particularly disappointing that there's no API (class attribute, etc) to 
control whether or not this new behaviour is enabled.

I believe the change that introduced this behaviour was in [issue18996]

--
components: Tests
keywords: 3.4regression
messages: 221167
nosy: cjw296
priority: normal
severity: normal
status: open
title: unittest: unhelpful truncating of long strings.
type: behavior
versions: Python 3.4

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-21 Thread Nick Coghlan

Nick Coghlan added the comment:

I'd say it's actually a bug that the new behaviour is triggering for inputs 
that aren't strings.

--
nosy: +ncoghlan

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-21 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +ezio.melotti, michael.foord

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-21 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray, serhiy.storchaka

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