You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The change for issue bpo-16997 82844:5c09e1c57200 introduced a regression with testtools. See attached file and instructions for reproducing it (it requires the testtools package).
Mark the test as an expected failure. If the test fails when run, the test is not counted as a failure.
"
is in the public docs for the unittest module, and depending on a private attribute to be set is a bit of an abstraction violation - at the least it should handle it not being set (for any older test unittest compatible testcase object).
So here's the thing. It only works in Python 3.3 because testtools depends on internal implementation details of unittest, specifically a private exception ("unittest.case._UnexpectedSuccess"). The public interface still works fine. So I don't think this is a regression. If testtools is willing to release hacks depending on undocumented internal behavior, I don't think it's unreasonable for them to rework their hack to support Python 3.4.
That said, it might be nice to not break testtools if we can avoid it. Antoine: would it be reasonable to rework the implementation of subTest in a way that permitted us to revert the changes to expectedFailure?
Oh! I didn't realise it was due to us looking at a private exception - I haven't been given a traceback to review, just the statement of a problem.... We shouldn't have done that(and *Definitely* should have filed a bug that we needed to).
So - I think the question should become 'can we cope with this in testtools' - we'll issue a point release to ensure compat, assuming it's at all possible.
Antoine: would it be reasonable to rework the implementation of
subTest in a way that permitted us to revert the changes to
expectedFailure?
I can't tell you for sure, but certainly not in an easy way. Expected failures were the most delicate feature to keep compatible when adding subtests.
(in other words: not for 3.4, IMO)
Then I'm marking this as 3.5 and clearing the regression keyword. From here we can either fix it in 3.5 or not bother (and just close this issue as wontfix).
Larry suggested closing this as wontfix 5 years ago. Since testtools added code for this test and there hasn't been any other changes since, I'll close per his suggestion.
Activity
warsaw commentedon Feb 19, 2014
The change for issue bpo-16997 82844:5c09e1c57200 introduced a regression with testtools. See attached file and instructions for reproducing it (it requires the testtools package).
rbtcollins commentedon Feb 19, 2014
I concur that this is a regression - "
"
is in the public docs for the unittest module, and depending on a private attribute to be set is a bit of an abstraction violation - at the least it should handle it not being set (for any older test unittest compatible testcase object).
warsaw commentedon Feb 19, 2014
Bumping to release blocker so Larry can make a determination.
larryhastings commentedon Feb 20, 2014
So here's the thing. It only works in Python 3.3 because testtools depends on internal implementation details of unittest, specifically a private exception ("unittest.case._UnexpectedSuccess"). The public interface still works fine. So I don't think this is a regression. If testtools is willing to release hacks depending on undocumented internal behavior, I don't think it's unreasonable for them to rework their hack to support Python 3.4.
That said, it might be nice to not break testtools if we can avoid it. Antoine: would it be reasonable to rework the implementation of subTest in a way that permitted us to revert the changes to expectedFailure?
rbtcollins commentedon Feb 20, 2014
Oh! I didn't realise it was due to us looking at a private exception - I haven't been given a traceback to review, just the statement of a problem.... We shouldn't have done that(and *Definitely* should have filed a bug that we needed to).
So - I think the question should become 'can we cope with this in testtools' - we'll issue a point release to ensure compat, assuming it's at all possible.
pitrou commentedon Feb 20, 2014
I can't tell you for sure, but certainly not in an easy way. Expected failures were the most delicate feature to keep compatible when adding subtests.
(in other words: not for 3.4, IMO)
larryhastings commentedon Feb 20, 2014
Then I'm marking this as 3.5 and clearing the regression keyword. From here we can either fix it in 3.5 or not bother (and just close this issue as wontfix).
csabella commentedon Feb 21, 2019
Larry suggested closing this as wontfix 5 years ago. Since testtools added code for this test and there hasn't been any other changes since, I'll close per his suggestion.