Opened 11 years ago

Closed 11 years ago

#3846 defect closed fixed (fixed)

t.mail.test.test_imap.PreauthIMAP4ClientMixin._result conflicts with Python 2.7 unittest

Reported by: ivank Owned by:
Priority: normal Milestone: Python-2.7
Component: mail Keywords: easy
Cc: Branch: branches/rename-private-result-3846
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

Description

Python 2.7r72791 unittest.TestCase has a _result attribute.

Summary of failures caused by the _result conflict:

  IMAP4ClientExamineTests
    test_bareOk ...                                                     [ERROR]
    test_exists ...                                                     [ERROR]
    test_flags ...                                                      [ERROR]
    test_nonIntegerExists ...                                            [FAIL]
    test_nonIntegerRecent ...                                            [FAIL]
                                          [ERROR]
    test_nonIntegerUIDNEXT ...                                           [FAIL]
    test_nonIntegerUIDVALIDITY ...                                       [FAIL]
                                     [ERROR]
                                     [ERROR]
    test_nonIntegerUnseen ...                                            [FAIL]
    test_permanentflags ...                                             [ERROR]
                                            [ERROR]
    test_recent ...                                                     [ERROR]
    test_uidnext ...                                                    [ERROR]
    test_uidvalidity ...                                                [ERROR]
    test_unrecognizedOk ...                                             [ERROR]
    test_unseen ...                                                     [ERROR]
  IMAP4ClientExpungeTests
    test_expunge ...                                                    [ERROR]
    test_nonIntegerExpunged ...                                          [FAIL]
  IMAP4ClientFetchTests
    test_fetchBody ...                                                  [ERROR]
    test_fetchSpecific ...                                              [ERROR]
    test_fetchSpecificMIME ...                                          [ERROR]
    test_fetchSpecificNumbered ...                                      [ERROR]
    test_fetchSpecificNumberedText ...                                  [ERROR]
    test_fetchSpecificPartial ...                                       [ERROR]
    test_fetchSpecificPeek ...                                          [ERROR]
    test_fetchSpecificText ...                                          [ERROR]
    test_fetchUID ...                                                   [ERROR]
    test_fetchUIDNonIntegerFound ...                                     [FAIL]
    test_incompleteFetchSpecificPartialResponse ...                      [FAIL]
    test_incompleteFetchSpecificTextResponse ...                         [FAIL]
    test_incompleteFetchUIDResponse ...                                  [FAIL]
                                [ERROR]
  IMAP4ClientSearchTests
    test_nonIntegerFound ...                                             [FAIL]
    test_search ...                                                     [ERROR]
  IMAP4ClientStoreTests
    test_addFlags ...                                                   [ERROR]
    test_addFlagsSilently ...                                           [ERROR]
    test_addFlagsSilentlyWithUnsolicitedData ...                        [ERROR]
    test_removeFlags ...                                                [ERROR]
    test_removeFlagsSilently ...                                        [ERROR]
    test_removeFlagsSilentlyWithUnsolicitedData ...                     [ERROR]
                    [ERROR]
                    [ERROR]
                    [ERROR]
                    [ERROR]
                    [ERROR]
                    [ERROR]
    test_setFlags ...                                                   [ERROR]
    test_setFlagsSilently ...                                           [ERROR]
    test_setFlagsSilentlyWithUnsolicitedData ...                        [ERROR]

Change History (9)

comment:1 Changed 11 years ago by Jean-Paul Calderone

http://svn.python.org/view/python/trunk/Lib/unittest.py?r1=72191&r2=72219 seems to be the offending change.

We should be more careful about which private names we use, I suppose, particularly when subclassing third-party classes.

comment:2 Changed 11 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/rename-private-result-3846

(In [26938]) Branching to 'rename-private-result-3846'

comment:3 Changed 11 years ago by Jean-Paul Calderone

(In [26939]) rename _result to _extractDeferredResult

refs #3846

comment:4 Changed 11 years ago by Jean-Paul Calderone

Keywords: review easy added
Owner: Jean-Paul Calderone deleted

comment:6 Changed 11 years ago by therve

Keywords: review removed

Please merge.

comment:7 Changed 11 years ago by therve

Owner: set to Jean-Paul Calderone

comment:8 Changed 11 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [26966]) Merge rename-private-result-3846

Author: exarkun Reviewer: therve Fixes: #3846

Change the name of the private _result helper function used by PreauthIMAP4ClientMixin to _extractDeferredResult which both better describes its function and which is less likely to conflict with some other private attribute (eg, from unittest.TestCase or from a subclass which mixes it in).

comment:9 Changed 9 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.