Bug 102253 - Remove uses of deprecated unittest.TestCase aliases
Summary: Remove uses of deprecated unittest.TestCase aliases
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 11:03 PST by Zan Dobersek
Modified: 2012-11-14 11:30 PST (History)
6 users (show)

See Also:


Attachments
Patch (384.80 KB, patch)
2012-11-14 11:07 PST, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2012-11-14 11:03:51 PST
Remove uses of deprecated unittest.TestCase aliases
Comment 1 Zan Dobersek 2012-11-14 11:07:17 PST
Created attachment 174205 [details]
Patch
Comment 2 Zan Dobersek 2012-11-14 11:08:50 PST
The aliases are deprecated from 2.7 onwards.
http://docs.python.org/2/library/unittest.html#deprecated-aliases
Comment 3 WebKit Review Bot 2012-11-14 11:11:08 PST
Attachment 174205 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/BuildSlaveSupport/build.webkit.org-c..." exit_code: 1
/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/lint.py:393: DeprecationWarning: disable-msg is deprecated, replace it by disable (/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py, line         self.command = self.command_constructor()  # lint warns that command_constructor might not be set, but this is intentional; pylint: disable-msg=E1102
)
  DeprecationWarning)
/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/lint.py:393: DeprecationWarning: disable-msg is deprecated, replace it by disable (/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py, line         self.command._write = (lambda msg: self.lines.append(msg))  # pylint bug warning about unnecessary lambda? pylint: disable-msg=W0108
)
  DeprecationWarning)
/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/lint.py:393: DeprecationWarning: disable-msg is deprecated, replace it by disable (/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py, line         self.assertEqual(mock_options.configuration, 'default')  # pylint: disable-msg=E1101
)
  DeprecationWarning)
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:63:  [GenericFileSystemTests.test_glob__trailing_asterisk] Instance of 'GenericFileSystemTests' has no 'assertEqual' member  [pylint/E1101] [5]
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:63:  [GenericFileSystemTests.test_glob__trailing_asterisk] Instance of 'GenericFileSystemTests' has no 'fs' member  [pylint/E1101] [5]
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:67:  [GenericFileSystemTests.test_glob__leading_asterisk] Instance of 'GenericFileSystemTests' has no 'assertEqual' member  [pylint/E1101] [5]
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:67:  [GenericFileSystemTests.test_glob__leading_asterisk] Instance of 'GenericFileSystemTests' has no 'fs' member  [pylint/E1101] [5]
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:71:  [GenericFileSystemTests.test_glob__middle_asterisk] Instance of 'GenericFileSystemTests' has no 'assertEqual' member  [pylint/E1101] [5]
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:71:  [GenericFileSystemTests.test_glob__middle_asterisk] Instance of 'GenericFileSystemTests' has no 'fs' member  [pylint/E1101] [5]
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:75:  [GenericFileSystemTests.test_glob__period_is_escaped] Instance of 'GenericFileSystemTests' has no 'assertEqual' member  [pylint/E1101] [5]
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:75:  [GenericFileSystemTests.test_glob__period_is_escaped] Instance of 'GenericFileSystemTests' has no 'fs' member  [pylint/E1101] [5]
/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/lint.py:393: DeprecationWarning: disable-msg is deprecated, replace it by disable (/mnt/git/webkit-style-queue/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py, line         self.assertEqual(ordered_dict.keys()[-2:], options.additional_expectations)  # pylint: disable-msg=E1101
)
  DeprecationWarning)
Total errors found: 8 in 96 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Dirk Pranke 2012-11-14 11:15:55 PST
Comment on attachment 174205 [details]
Patch

(perhaps obviously) I didn't realize self.assertEqual() was preferred. Good to know.
Comment 5 WebKit Review Bot 2012-11-14 11:30:03 PST
Comment on attachment 174205 [details]
Patch

Clearing flags on attachment: 174205

Committed r134636: <http://trac.webkit.org/changeset/134636>
Comment 6 WebKit Review Bot 2012-11-14 11:30:07 PST
All reviewed patches have been landed.  Closing bug.