[issue13349] Non-informative error message in index() and remove() functions

2012-11-03 Thread Éric Araujo
Changes by Éric Araujo : -- title: Uninformal error message in index() and remove() functions -> Non-informative error message in index() and remove() functions ___ Python tracker _

[issue13349] Non-informative error message in index() and remove() functions

2012-11-03 Thread Sean Ochoa
Sean Ochoa added the comment: Working on issue as part of Python Bug Day, Oct 2012. -- nosy: +Sean.Ochoa ___ Python tracker ___ ___ Py

[issue13349] Non-informative error message in index() and remove() functions

2012-11-03 Thread Sean Ochoa
Sean Ochoa added the comment: It seems that this has been fixed. Using simple tests from msg147215: ~/hg/cpython/working $ env-py3.3/bin/python Python 3.3.0 (default, Nov 3 2012, 15:28:29) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> [].ind

[issue13349] Non-informative error message in index() and remove() functions

2012-11-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: The original example was about tuples and displaying 'x' instead of '4'. Have that and *all* the others been fixed? -- ___ Python tracker ___ _

[issue13349] Non-informative error message in index() and remove() functions

2012-11-03 Thread Sean Ochoa
Sean Ochoa added the comment: After discussing with folks on the #python-dev tonight, I learned that I was testing with a list and I should've been using a set. I'm working on a patch now, and I'm almost ready to have it reviewed. -- ___ Python tra

[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Sean Ochoa
Sean Ochoa added the comment: Ready for review. -- keywords: +patch Added file: http://bugs.python.org/file27884/issue-13349.patch ___ Python tracker ___

[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Ezio Melotti
Ezio Melotti added the comment: You should use assertRaises/assertRaisesRegex to check the error message and add more tests to cover all the changes. I also noticed an inconsistence between 'element not in container' and 'element is not in container' (note the extra 'is'). FWIW I prefer the

[issue13349] Non-informative error message in index() and remove() functions

2012-11-05 Thread Sean Ochoa
Sean Ochoa added the comment: Tests updated for coverage and to use assertRaisesRegex. -- Added file: http://bugs.python.org/file27907/issue13349.patch.1 ___ Python tracker ___ _

[issue13349] Non-informative error message in index() and remove() functions

2012-11-07 Thread Sean Ochoa
Sean Ochoa added the comment: >From Taggnostr on #python-dev: 1.) Use assertRaises+assertIn instead of assertRaisesRegex 2.) Add or change an existing test that you've already updated to use elements with a repr longer than 100 chars. -- ___ Pyth

[issue13349] Non-informative error message in index() and remove() functions

2012-11-09 Thread Sean Ochoa
Sean Ochoa added the comment: Truncating repr strings to 100chars will require the patch from #7330. After applying the patch from that issue, my tests work fine. -- ___ Python tracker ___

[issue13349] Non-informative error message in index() and remove() functions

2012-11-09 Thread Sean Ochoa
Sean Ochoa added the comment: Updated patch after taking into account Ezio's (aka Taggnostr on #python-dev) latest feedback. -- Added file: http://bugs.python.org/file27940/issue13349.patch.2 ___ Python tracker __

[issue13349] Non-informative error message in index() and remove() functions

2012-11-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A ___ Python tracker ___ ___

[issue13349] Non-informative error message in index() and remove() functions

2012-11-10 Thread Sean Ochoa
Sean Ochoa added the comment: Updates after feedback from Serhiy. -- Added file: http://bugs.python.org/file27949/issue13349.patch.3 ___ Python tracker ___ __

[issue13349] Non-informative error message in index() and remove() functions

2012-11-10 Thread Julian Berman
Julian Berman added the comment: test_issuewhatever is a bit indescriptive. It'd be easier for someone glancing at the test to see what it claims to be testing if there were a more descriptive name given, like perhaps test_exception_message (or something even more verbose). -- nosy: +

[issue13349] Non-informative error message in index() and remove() functions

2012-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Or test_index()/test_remove(). In this case positive test cases (and may be other exception types) should be added. -- nosy: +serhiy.storchaka ___ Python tracker __

[issue13349] Non-informative error message in index() and remove() functions

2012-11-12 Thread Sean Ochoa
Sean Ochoa added the comment: Lib/test/test_array.py -- Moved index test (for this issue) to test_index (existing test method). -- Added remove test (for this issue) to test_remove (existing test method) Lib/test/test_deque.py -- Moved remove test (for this issue) to test_index (existing t

[issue13349] Non-informative error message in index() and remove() functions

2012-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also my comments to previous patch about repr() and error message checking. -- ___ Python tracker ___

[issue13349] Non-informative error message in index() and remove() functions

2012-12-08 Thread Sean Ochoa
Sean Ochoa added the comment: Update based on Taggnostr's (Ezio on IRC, if I recall correctly) feedback from 11/12/2012 around 11:57 PST. * Added check for index result in positive tests. * Added assertIn check for remove result in positive tests. * Removed extra whitespace. * Formatted comme

[issue13349] Non-informative error message in index() and remove() functions

2012-12-08 Thread Sean Ochoa
Sean Ochoa added the comment: * Fixed issue with test name in Lib/test/test_tuple.py * Fixed issue with test_remove in Lib/test/test_list.py to assertNotIn instead of assertIn for positive case. Confirmed with Ezio that issue #7330 will need to be fixed/approved before this issue can be closed

[issue13349] Non-informative error message in index() and remove() functions

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: > Confirmed with Ezio that issue #7330 will need to be fixed/approved before > this issue can be closed. FYI I just fixed this issue. PyUnicode_FromFormat() now supports width and precision in the format string. -- nosy: +haypo __