[issue7625] bytearray needs more tests for "b.some_method()[0] is not b"

2010-01-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in trunk (r77475) and py3k (r77476).
Thank you.

--
nosy: +pitrou
resolution:  -> fixed
status: open -> closed
versions:  -Python 2.6, Python 3.1

___
Python tracker 

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



[issue7625] bytearray needs more tests for "b.some_method()[0] is not b"

2010-01-04 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch for some additional test cases attached.

The bug "b.partition('.')[0] is b" is fixed with the patch proposed on 
issue7622.

--
keywords: +patch
Added file: http://bugs.python.org/file15733/issue7625_tests.diff

___
Python tracker 

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



[issue7625] bytearray needs more tests for "b.some_method()[0] is not b"

2010-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue7625] bytearray needs more tests for "b.some_method()[0] is not b"

2010-01-03 Thread Florent Xicluna

Changes by Florent Xicluna :


--
components: +Interpreter Core
versions: +Python 2.6, Python 3.1, Python 3.2

___
Python tracker 

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



[issue7625] bytearray needs more tests for "b.some_method()[0] is not b"

2010-01-03 Thread Florent Xicluna

Florent Xicluna  added the comment:

And each test comes with a new bug :)

>>> x = bytearray('abc')
>>> x.partition('.')[0] is x
True
>>> x.rpartition('.')[2] is x
True

--
priority: low -> normal

___
Python tracker 

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



[issue7625] bytearray needs more tests for "b.some_method()[0] is not b"

2010-01-03 Thread Florent Xicluna

New submission from Florent Xicluna :

There's not enough tests to verify such cases:
 - b.split()[0] is not b
 - b.rsplit()[0] is not b
 - b.splitlines()[0] is not b
 - b.partition('.')[0] is not b
 - b.rpartition('.')[0] is not b
 - (other ?)

However similar tests exist in Lib/test/test_bytes:
 * ByteArrayTest.test_copied()
   -> some tests for ('replace', 'translate')
 * ByteArrayTest.test_partition_bytearray_doesnt_share_nullstring
   -> some tests for ('partition', 'rpartition')
 * BytearrayPEP3137Test.test_returns_new_copy()
   -> some tests for ('zfill', 'rjust', 'ljust', 'center')

--
components: Tests
messages: 97176
nosy: flox
priority: low
severity: normal
stage: needs patch
status: open
title: bytearray needs more tests for "b.some_method()[0] is not b"
versions: Python 2.7

___
Python tracker 

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