RESOLVED FIXED 102253
Remove uses of deprecated unittest.TestCase aliases
https://bugs.webkit.org/show_bug.cgi?id=102253
Summary Remove uses of deprecated unittest.TestCase aliases
Zan Dobersek
Reported 2012-11-14 11:03:51 PST
Remove uses of deprecated unittest.TestCase aliases
Attachments
Patch (384.80 KB, patch)
2012-11-14 11:07 PST, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2012-11-14 11:07:17 PST
Zan Dobersek
Comment 2 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
WebKit Review Bot
Comment 3 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.
Dirk Pranke
Comment 4 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.
WebKit Review Bot
Comment 5 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>
WebKit Review Bot
Comment 6 2012-11-14 11:30:07 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.