Remove uses of deprecated unittest.TestCase aliases
Created attachment 174205 [details] Patch
The aliases are deprecated from 2.7 onwards. http://docs.python.org/2/library/unittest.html#deprecated-aliases
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 on attachment 174205 [details] Patch (perhaps obviously) I didn't realize self.assertEqual() was preferred. Good to know.
Comment on attachment 174205 [details] Patch Clearing flags on attachment: 174205 Committed r134636: <http://trac.webkit.org/changeset/134636>
All reviewed patches have been landed. Closing bug.