Issue1926

classification
Title: Adjust MutableSet.pop test so we do not need to skip it
Type: Severity: normal
Components: Versions:
Milestone:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, int3
Priority: normal Keywords: patch

Created on 2012-06-16.11:20:53 by int3, last changed 2013-02-27.18:21:59 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
set_pop int3, 2012-06-16.11:20:53 Patch
Messages
msg7234 (view) Author: Jez Ng (int3) Date: 2012-06-16.11:20:53
The test was originally created for issue 4920 in CPython, where MutableSet.pop was erroneously throwing an exception. The test introduced ended up checking the return value of pop() as well, probably to be on the safe side. However, since the underlying set() that implements MutableSet returns elements in an arbitrary order[1], checking for a specific return value means the test is implementation-dependent. I've changed it to check that the returned value is any one of the values that were initially put into the set.

[1]: http://docs.python.org/library/stdtypes.html#set.pop
msg7846 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-27.18:09:13
Hi Jez, great patch! I will apply it today. Sorry I've been slow to see this one. Choosing the "patch" keyword will get my attention a little faster. I'm trying hard this year to be a better at accepting patches, I know it must be frustrating to do all of this work and have it go ignored for so long.
msg7847 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-27.18:20:48
Applied in http://hg.python.org/jython/rev/caac84e8f7f2 thanks again Jezreel!
History
Date User Action Args
2013-02-27 18:21:59fwierzbickisetstatus: open -> closed
resolution: accepted
2013-02-27 18:20:48fwierzbickisetmessages: + msg7847
2013-02-27 18:09:13fwierzbickisetkeywords: + patch
messages: + msg7846
2012-06-18 04:05:59fwierzbickisetpriority: normal
assignee: fwierzbicki
nosy: + fwierzbicki
2012-06-16 11:20:54int3create