[issue18993] There is an overshadowed and invalid test in testmock.py

2014-09-24 Thread Berker Peksag
Berker Peksag added the comment: This has been fixed in https://hg.python.org/cpython/rev/c8c11082bd0c. -- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue18993] There is an overshadowed and invalid test in testmock.py

2014-07-18 Thread Mark Lawrence
Mark Lawrence added the comment: Can we have a formal review on the latest patch please. -- nosy: +BreamoreBoy type: enhancement -> behavior versions: +Python 3.5 -Python 3.3 ___ Python tracker

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-14 Thread Vajrasky Kok
Vajrasky Kok added the comment: Michael, attached the patch to accommodate your request. Yeah, I think this is the best way because I have seen no possible solutions to make both tests work without altering them. Xavier, that's cool. I didn't know such tool exists. Usually I found the duplica

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-14 Thread Michael Foord
Michael Foord added the comment: On balance I think that this test failing is *correct* (after deleting an attribute the old mock should *not* come back). I'd rather adjust the test to assert this than just remove it though. -- ___ Python tracker <

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-14 Thread Xavier de Gaye
Xavier de Gaye added the comment: The duplicate_code_names.py script in issue 16079 did find that there are duplicate test_attribute_deletion tests in testmock.py (see http://bugs.python.org/file27376/std_lib_duplicates.txt). -- nosy: +xdegaye ___ Pyt

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, I found the difference. The second test case is to test the case on which we delete the attribute of the mock instance before being referenced by any variable. The we make sure the attribute is gone for good. The first test case is to test the case on whi

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-13 Thread Michael Foord
Michael Foord added the comment: Well, they actually test slightly different scenarios - they're *not* just duplicates of each other. -- ___ Python tracker ___ _

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: The first test fails. I already tested it. I think they test the same thing, what happens to the attribute of mock instance if you delete it. -- ___ Python tracker

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ezio.melotti, michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Michael Foord
Michael Foord added the comment: Good catch - thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Michael Foord
Michael Foord added the comment: Although I'm not certain the first test is "invalid". It's testing a different case than the second test. So if the first test passes it should be renamed rather than removed. If it *fails* then I'd like to look at the behaviour and specify (test) that. --

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-09 Thread Vajrasky Kok
New submission from Vajrasky Kok: In Lib/unittest/test/testmock/testmock.py, there are two test_attribute_deletion. One of them is overshadowed (not executed) by the other. def test_attribute_deletion(self): # this behaviour isn't *useful*, but at least it's now tested... f