Remove uses of deprecated unittest.TestCase aliases
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2012 19:29:25 +0000 (19:29 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2012 19:29:25 +0000 (19:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=102253

Reviewed by Dirk Pranke.

Replace the deprecated unittest.TestCase methods with the corresponding methods
everywhere inside the Tools directory. The following replacements are done:
- assertEquals -> assertEqual
- assert_ -> assertTrue
- failUnlessRaises -> assertRaises

* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
(SVNMirrorTest.test_CheckOutSource):
* QueueStatusServer/model/queuepropertymixin_unittest.py:
(QueuePropertyMixinTest.test_queue_property):
* QueueStatusServer/model/queues_unittest.py:
(QueueTest._assert_short_name):
(QueueTest._assert_display_name):
(QueueTest._assert_name_with_underscores):
* QueueStatusServer/model/workitems_unittest.py:
(WorkItemsTest.test_display_position_for_attachment):
* Scripts/webkitpy/common/checkout/changelog_unittest.py:
(test_parse_log_entries_from_changelog):
(test_parse_log_entries_from_annotated_file):
(_assert_parse_reviewer_text_and_list):
(_assert_parse_reviewer_text_list):
(_assert_fuzzy_reviewer_match):
(_assert_parse_authors):
(test_latest_entry_parse):
(test_latest_entry_parse_single_entry):
(test_set_reviewer):
(test_set_short_description_and_bug_url):
* Scripts/webkitpy/common/checkout/diff_parser_unittest.py:
(DiffParserTest.test_diff_parser):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(GitSVNTest.test_revisions_changing_files_with_local_commit):
(GitSVNTest.test_upstream_branch):
(GitSVNTest.test_create_patch_with_rm_and_changed_files):
(GitTestWithMock.test_push_local_commits_to_server_with_username_and_password):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_mac_port):
(DeprecatedPortTest.test_gtk_port):
(DeprecatedPortTest.test_efl_port):
(DeprecatedPortTest.test_qt_port):
(DeprecatedPortTest.test_chromium_port):
(DeprecatedPortTest.test_chromium_android_port):
(DeprecatedPortTest.test_chromium_xvfb_port):
* Scripts/webkitpy/common/config/urls_unittest.py:
(URLsTest.test_parse_bug_id):
(URLsTest.test_parse_attachment_id):
* Scripts/webkitpy/common/find_files_unittest.py:
(TestWinNormalize.assert_filesystem_normalizes):
* Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
(test_url_creation):
(test_parse_bug_id):
(_assert_dictionaries_equal):
(test_parse_bugs_from_xml):
(test_attachment_detail_bug_parsing):
(_assert_result_count):
(test_request_page_parsing):
(test_quip_page_parsing):
(EditUsersParserTest._assert_login_userid_pairs):
* Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
(test_status_parsing):
(test_latest_cached_build):
(test_results_zip_url):
* Scripts/webkitpy/common/net/credentials_unittest.py:
(test_credentials_from_environment):
* Scripts/webkitpy/common/net/failuremap_unittest.py:
(FailureMapTest.test_failing_revisions):
(FailureMapTest.test_new_failures):
(FailureMapTest.test_new_failures_with_old_revisions):
(FailureMapTest.test_new_failures_with_more_old_revisions):
(FailureMapTest.test_tests_failing_for):
(FailureMapTest.test_failing_tests):
* Scripts/webkitpy/common/net/layouttestresults_unittest.py:
(LayoutTestResultsTest.test_set_failure_limit_count):
* Scripts/webkitpy/common/net/unittestresults_unittest.py:
(UnitTestResultsTest.test_nostring):
(UnitTestResultsTest.test_emptystring):
* Scripts/webkitpy/common/read_checksum_from_png_unittest.py:
(ReadChecksumFromPngTest.test_read_checksum):
* Scripts/webkitpy/common/system/deprecated_logging_unittest.py:
(LoggingTest.assert_log_equals):
* Scripts/webkitpy/common/system/executive_unittest.py:
(ScriptErrorTest.test_string_from_args):
(ScriptErrorTest.test_message_with_output):
(ExecutiveTest.test_run_command_with_bad_command):
(ExecutiveTest.test_run_command_with_unicode):
(ExecutiveTest.serial_test_run_in_parallel):
* Scripts/webkitpy/common/system/filesystem_mock_unittest.py:
(MockFileSystemTest.quick_check):
* Scripts/webkitpy/common/system/filesystem_unittest.py:
(GenericFileSystemTests.test_glob__trailing_asterisk):
(GenericFileSystemTests.test_glob__leading_asterisk):
(GenericFileSystemTests.test_glob__middle_asterisk):
(GenericFileSystemTests.test_glob__period_is_escaped):
(RealFileSystemTest.test_chdir):
(RealFileSystemTest.test_remove_file_with_retry):
(RealFileSystemTest.test_sep):
* Scripts/webkitpy/common/system/logtesting.py:
(TestLogStream.assertMessages):
* Scripts/webkitpy/common/system/logutils_unittest.py:
(GetLoggerTest.test_get_logger_in_webkitpy):
(GetLoggerTest.test_get_logger_not_in_webkitpy):
* Scripts/webkitpy/common/system/outputcapture.py:
(OutputCaptureTestCaseBase.assertStdout):
(OutputCaptureTestCaseBase.assertStderr):
* Scripts/webkitpy/common/system/path_unittest.py:
(AbspathTest.test_abspath_to_uri_cygwin):
(AbspathTest.test_abspath_to_uri_unixy):
(AbspathTest.test_abspath_to_uri_win):
(AbspathTest.test_abspath_to_uri_escaping_unixy):
(AbspathTest.test_abspath_to_uri_escaping_cygwin):
* Scripts/webkitpy/common/system/platforminfo_unittest.py:
(TestPlatformInfo.test_real_code):
(TestPlatformInfo.test_os_name_and_wrappers):
(TestPlatformInfo.test_os_version):
(TestPlatformInfo.test_total_bytes_memory):
* Scripts/webkitpy/common/system/user_unittest.py:
(UserTest.test_confirm.mock_raw_input):
(UserTest.test_confirm):
* Scripts/webkitpy/common/system/zipfileset_unittest.py:
(ZipFileSetTest.test_open):
(ZipFileSetTest.test_read):
* Scripts/webkitpy/common/watchlist/watchlist_unittest.py:
(WatchListTest.test_filename_definition_no_matches):
(WatchListTest.test_filename_definition):
(WatchListTest.test_cc_rules_simple):
(WatchListTest.test_cc_rules_complex):
(WatchListTest.test_cc_and_message_rules_complex):
(WatchListTest.test_cc_and_message_rules_no_matches):
(WatchListTest.test_added_match):
(WatchListTest.test_deleted_match):
(WatchListTest.test_more_and_less_match):
(WatchListTest.test_complex_match):
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(LockCheckingRunner.handle_finished_list):
(LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
(LayoutTestRunnerTests.test_update_summary_with_result):
(LayoutTestRunnerTests.test_servers_started):
(SharderTests.assert_shards):
(SharderTests.test_shard_in_two_has_no_locked_shards):
(SharderTests.test_shard_in_two_has_no_unlocked_shards):
(NaturalCompareTest.assert_cmp):
(KeyCompareTest.assert_cmp):
* Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py:
(TestConfigurationTest.test_items):
(TestConfigurationTest.test_keys):
(TestConfigurationTest.test_str):
(TestConfigurationTest.test_repr):
(TestConfigurationTest.test_hash):
(TestConfigurationTest.test_eq):
(TestConfigurationTest.test_values):
(SpecifierSorterTest.test_init):
(SpecifierSorterTest.test_add_specifier):
(SpecifierSorterTest.test_add_macros):
(SpecifierSorterTest.test_category_priority):
(SpecifierSorterTest.test_specifier_priority):
(SpecifierSorterTest.test_sort_specifiers):
(TestConfigurationConverterTest.test_symmetric_difference):
(TestConfigurationConverterTest.test_to_config_set):
(TestConfigurationConverterTest.test_macro_expansion):
(TestConfigurationConverterTest.test_to_specifier_lists):
(TestConfigurationConverterTest.test_macro_collapsing):
(TestConfigurationConverterTest.test_converter_macro_collapsing):
(TestConfigurationConverterTest.test_specifier_converter_access):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(assert_exp):
(MiscTests.test_result_was_expected):
(MiscTests.test_remove_pixel_failures):
(MiscTests.test_suffixes_for_expectations):
(MiscTests.test_get_expectations_string):
(SkippedTests.check):
(ExpectationSyntaxTests.assert_tokenize_exp):
(SemanticTests.test_bad_bugid):
(SemanticTests.test_missing_bugid):
(TestExpectationSerializationTests.test_reconstitute_only_these):
* Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:
(TestFailuresTest.test_crashes):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_nonexistant_expectations):
(PortTest.test_additional_expectations):
* Scripts/webkitpy/layout_tests/port/builders_unittest.py:
(BuildersTest.test_path_from_name):
* Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
(ChromiumAndroidPortTest.test_attributes):
(ChromiumAndroidPortTest.test_default_timeout_ms):
(ChromiumAndroidPortTest.test_get_devices_one_device):
(ChromiumAndroidPortTest.test_get_devices_two_devices):
(ChromiumAndroidPortTest.test_get_device_serial_one_device):
(ChromiumAndroidPortTest.test_get_device_serial_two_devices):
(ChromiumAndroidPortTest.test_must_require_http_server):
(ChromiumAndroidDriverTest.test_get_last_stacktrace):
(ChromiumAndroidDriverTest.test_get_crash_log):
(ChromiumAndroidDriverTest.test_cmd_line):
(ChromiumAndroidDriverTest.test_read_prompt):
(ChromiumAndroidDriverTest.test_command_from_driver_input):
(ChromiumAndroidDriverTwoDriversTest.test_two_drivers):
(ChromiumAndroidTwoPortsTest.test_options_with_two_ports):
* Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py:
(ChromiumLinuxPortTest.assert_architecture):
(ChromiumLinuxPortTest.test_determine_architecture_fails):
(ChromiumLinuxPortTest.test_path_to_image_diff):
* Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
(ChromiumMacPortTest.assert_name):
(ChromiumMacPortTest.test_baseline_path):
(ChromiumMacPortTest.test_path_to_image_diff):
* Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
(ChromiumPortTestCase.test_default_max_locked_shards):
(ChromiumPortTestCase.test_default_timeout_ms):
(ChromiumPortTestCase.test_default_pixel_tests):
(ChromiumPortTestCase.test_all_test_configurations):
(ChromiumPortTestCase.test_default_configuration):
(ChromiumPortTestCase.test_diff_image):
(ChromiumPortTestCase.test_diff_image_crashed):
(ChromiumPortTestCase.test_expectations_files):
* Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
(ChromiumWinTest.test_setup_environ_for_server_cygpath):
(ChromiumWinTest.assert_name):
(ChromiumWinTest.test_baseline_path):
(ChromiumWinTest.test_path_to_image_diff):
* Scripts/webkitpy/layout_tests/port/driver_unittest.py:
(DriverTest.test_read_block):
(DriverTest.test_read_binary_block):
(DriverTest.test_read_base64_block):
(DriverTest.test_no_timeout):
(DriverTest.test_check_for_driver_crash.assert_crash):
(DriverTest.test_creating_a_port_does_not_write_to_the_filesystem):
* Scripts/webkitpy/layout_tests/port/factory_unittest.py:
(FactoryTest.test_get_from_builder_name):
* Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
(GtkPortTest.test_default_timeout_ms):
* Scripts/webkitpy/layout_tests/port/http_lock_unittest.py:
(HttpLockTest.test_current_lock_pid):
* Scripts/webkitpy/layout_tests/port/image_diff_unittest.py:
(TestImageDiffer.test_diff_image_failed):
(TestImageDiffer.test_diff_image_passed):
* Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py:
(LeakDetectorTest.test_leaks_args):
(test_parse_leaks_output):
(test_leaks_files_in_directory):
(test_count_total_leaks):
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(MacTest.test_default_timeout_ms):
(assert_name):
(test_setup_environ_for_server):
(_assert_search_path):
(test_32bit):
(test_64bit):
* Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
(MockTestShellTest.test_pixeltest__fails):
(MockTestShellTest.test_test_shell_parse_options):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(PortTestCase.test_default_max_locked_shards):
(PortTestCase.test_default_timeout_ms):
(PortTestCase.test_default_pixel_tests):
(PortTestCase.test_diff_image):
(PortTestCase.test_diff_image_crashed):
(PortTestCase.test_get_crash_log):
(PortTestCase.assert_build_path):
(PortTestCase.test_expectations_ordering):
(_assert_config_file_for_platform):
(test_path_to_apache_config_file):
(test_additional_platform_directory):
* Scripts/webkitpy/layout_tests/port/qt_unittest.py:
(QtPortTest._assert_search_path):
(QtPortTest._assert_expectations_files):
(QtPortTest.test_setup_environ_for_server):
* Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
(TestServerProcess.test_basic):
(TestServerProcess.test_broken_pipe):
* Scripts/webkitpy/layout_tests/port/win_unittest.py:
(WinPortTest._assert_search_path):
(WinPortTest._assert_version):
(WinPortTest.test_runtime_feature_list):
(WinPortTest.test_expectations_files):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(LintTest.test_all_configurations):
(MainTest.test_all):
(MainTest.test_repeat_each):
(MainTest.test_skipped_flag):
(MainTest.test_iterations):
(MainTest.test_run_chunk):
(MainTest.test_run_part):
(MainTest.test_run_singly):
(MainTest.test_run_singly_actually_runs_tests):
(MainTest.test_single_file):
(MainTest.test_single_file_with_prefix):
(MainTest.test_single_skipped_file):
(MainTest.test_stderr_is_saved):
(MainTest.test_test_list):
(MainTest.test_test_list_with_prefix):
(MainTest.test_missing_and_unexpected_results):
(MainTest.test_pixel_test_directories):
(MainTest.test_missing_and_unexpected_results_with_custom_exit_code):
(MainTest.test_crash_log):
(MainTest.test_web_process_crash_log):
(MainTest.test_exit_after_n_failures_upload):
(MainTest.test_exit_after_n_failures):
(MainTest.test_exit_after_n_crashes):
(MainTest.test_retrying_and_flaky_tests):
(MainTest.test_run_order__inline):
(MainTest.test_reftest_run):
(MainTest.test_reftest_run_reftests_if_pixel_tests_are_disabled):
(MainTest.test_reftest_skip_reftests_if_no_ref_tests):
(MainTest.test_reftest_expected_html_should_be_ignored):
(MainTest.test_reftest_driver_should_run_expected_html):
(MainTest.test_reftest_driver_should_run_expected_mismatch_html):
(MainTest.test_output_diffs):
(MainTest.test_unsupported_platform):
(EndToEndTest.test_end_to_end):
(RebaselineTest.test_reset_results):
(RebaselineTest.test_missing_results):
(RebaselineTest.test_new_baseline):
* Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py:
(BaseTest.integration_test_server__normal):
(BaseTest.integration_test_server__fails):
(BaseTest.integration_test_port_and_root):
* Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
(TestHttpServer.test_start_cmd):
* Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
(RegularTest.test_logging_not_included):
(RegularTest._basic):
(RegularTest.test_basic):
(RegularTest.test_log_after_update):
(RegularTest.test_log_args):
(TtyTest.test_basic):
(TtyTest.test_log_after_update):
(VerboseTest.test_basic):
(VerboseTest.test_log_after_update):
(VerboseTest.test_log_args):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.assertWritten):
(test_test_status_line):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.assertWritten):
* Scripts/webkitpy/style/checker_unittest.py:
(GlobalVariablesTest.test_webkit_base_filter_rules):
(CheckerDispatcherSkipTest._assert_should_skip_without_warning):
(CheckerDispatcherCarriageReturnTest.test_should_check_and_strip_carriage_returns):
(CheckerDispatcherDispatchTest.assert_checker):
(CheckerDispatcherDispatchTest.test_changelog_paths):
(CheckerDispatcherDispatchTest.test_cpp_paths):
(CheckerDispatcherDispatchTest.test_json_paths):
(CheckerDispatcherDispatchTest.test_python_paths):
(CheckerDispatcherDispatchTest.test_text_paths):
(CheckerDispatcherDispatchTest.test_xml_paths):
(StyleProcessorConfigurationTest.test_init):
(StyleProcessorConfigurationTest.test_write_style_error_emacs):
(StyleProcessorConfigurationTest.test_write_style_error_vs7):
(StyleProcessor_EndToEndTest.test_init):
(StyleProcessor_EndToEndTest.test_process):
(StyleProcessor_CodeCoverageTest.test_process__checker_dispatched):
* Scripts/webkitpy/style/checkers/changelog_unittest.py:
(ChangeLogCheckerTest.assert_error.handle_style_error):
(ChangeLogCheckerTest.test_init):
* Scripts/webkitpy/style/checkers/common_unittest.py:
(CarriageReturnCheckerTest.assert_carriage_return):
(TabCheckerTest.assert_tab):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppFunctionsTest.test_convert_to_lower_with_underscores):
(CppFunctionsTest.test_create_acronym):
(CppFunctionsTest.test_parameter):
(CppFunctionsTest.test_single_line_view):
(CppFunctionsTest.test_create_skeleton_parameters):
(CppFunctionsTest.test_find_parameter_name_index):
(CppFunctionsTest.test_parameter_list):
(CppFunctionsTest.test_check_parameter_against_text):
(CppStyleTestBase.perform_lint):
(CppStyleTestBase.assert_lint):
(CppStyleTestBase.assert_lint_one_of_many_errors_re):
(CppStyleTestBase.assert_multi_line_lint):
(CppStyleTestBase.assert_language_rules_check):
(CppStyleTestBase.assert_include_what_you_use):
(CppStyleTestBase.assert_blank_lines_check):
(CppStyleTestBase.assert_positions_equal):
(FunctionDetectionTest.perform_function_detection):
(CppStyleTest.test_get_line_width):
(CppStyleTest.test_find_next_multi_line_comment_start):
(CppStyleTest.test_find_next_multi_line_comment_end):
(CppStyleTest.test_remove_multi_line_comments_from_range):
(CppStyleTest.test_position):
(CppStyleTest.test_rfind_in_lines):
(CppStyleTest.test_close_expression):
(CppStyleTest.test_include_what_you_use_no_implementation_files):
(CppStyleTest.test_include_what_you_use):
(CppStyleTest.test_files_belong_to_same_module):
(CppStyleTest.test_cleanse_line):
(CppStyleTest.test_multiline_strings):
(CppStyleTest.test_newline_at_eof.do_test):
(CppStyleTest.test_invalid_utf8.do_test):
(CppStyleTest.test_is_blank_line):
(CppStyleTest.test_allow_blank_line_before_closing_namespace):
(CppStyleTest.test_allow_blank_line_before_if_else_chain):
(CppStyleTest.test_else_on_same_line_as_closing_braces):
(CppStyleTest.test_build_header_guard):
(CppStyleTest.test_legal_copyright):
(CleansedLinesTest.test_init):
(CleansedLinesTest.test_init_empty):
(CleansedLinesTest.test_collapse_strings):
(CheckForFunctionLengthsTest.assert_function_lengths_check):
(PassPtrTest.assert_pass_ptr_check):
(LeakyPatternTest.assert_leaky_pattern_check):
(WebKitStyleTest.test_parameter_names):
(WebKitStyleTest.test_webkit_export_check):
(CppCheckerTest.test_init):
* Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:
(JSONCheckerTest.assert_error.handle_style_error):
(JSONCheckerTest.test_init):
* Scripts/webkitpy/style/checkers/png_unittest.py:
(PNGCheckerTest.test_init):
(PNGCheckerTest.test_check):
* Scripts/webkitpy/style/checkers/python_unittest.py:
(PythonCheckerTest.test_init):
(PythonCheckerTest.test_check):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase._expect_port_for_expectations_path):
(TestExpectationsTestCase.assert_lines_lint):
* Scripts/webkitpy/style/checkers/text_unittest.py:
(TextStyleTestCase.assertNoError):
(TextStyleTestCase.assertError.error_for_test):
(TextStyleTestCase.assertError):
(TextCheckerTest.test_init):
* Scripts/webkitpy/style/checkers/watchlist_unittest.py:
(WatchListTest.test_basic_error_message.handle_style_error):
(WatchListTest):
* Scripts/webkitpy/style/checkers/xcodeproj_unittest.py:
(XcodeProjectFileCheckerTest.assert_error):
* Scripts/webkitpy/style/checkers/xml_unittest.py:
(XMLCheckerTest.assert_error.handle_style_error):
(XMLCheckerTest.test_init):
* Scripts/webkitpy/style/error_handlers_unittest.py:
(DefaultStyleErrorHandlerTest._check_initialized):
(DefaultStyleErrorHandlerTest.test_non_reportable_error):
(DefaultStyleErrorHandlerTest.test_max_reports_per_category):
(DefaultStyleErrorHandlerTest.test_line_numbers):
* Scripts/webkitpy/style/filereader_unittest.py:
(TextFileReaderTest._assert_file_reader):
(TextFileReaderTest.test_process_file__does_not_exist):
(TextFileReaderTest.test_count_delete_only_file):
* Scripts/webkitpy/style/filter_unittest.py:
(CategoryFilterTest.test_init):
(CategoryFilterTest.test_init_default_arguments):
(CategoryFilterTest.test_str):
(FilterConfigurationTest.test_init):
(FilterConfigurationTest.test_default_arguments):
* Scripts/webkitpy/style/main_unittest.py:
(ChangeDirectoryTest._assert_result):
* Scripts/webkitpy/style/optparser_unittest.py:
(ArgumentPrinterTest.test_to_flag_string):
(ArgumentParserTest.test_parse_default_arguments):
(ArgumentParserTest.test_parse_explicit_arguments):
(ArgumentParserTest.test_parse_files):
(CommandOptionValuesTest.test_init):
* Scripts/webkitpy/style/patchreader_unittest.py:
(PatchReaderTest._assert_checked):
* Scripts/webkitpy/test/finder_unittest.py:
(FinderTest.test_additional_system_paths):
(FinderTest.test_to_module):
(FinderTest.check_names):
* Scripts/webkitpy/test/main_unittest.py:
(TesterTest.test_individual_names_are_not_run_twice):
(TesterTest.test_integration_tests_are_not_found_by_default):
(TesterTest.test_integration_tests_are_found):
(TesterTest.integration_test_coverage_works):
* Scripts/webkitpy/test/runner_unittest.py:
(RunnerTest.test_run):
* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
(_expect_validate):
* Scripts/webkitpy/tool/bot/expectedfailures_unittest.py:
(ExpectedFailuresTest._assert_can_trust):
(ExpectedFailuresTest.test_unexpected_failures_observed):
(ExpectedFailuresTest.test_unexpected_failures_observed_when_tree_is_hosed):
* Scripts/webkitpy/tool/bot/feeders_unittest.py:
(test_patches_with_acceptable_review_flag):
* Scripts/webkitpy/tool/bot/irc_command_unittest.py:
(IRCCommandTest.test_whois):
(IRCCommandTest.test_create_bug):
(IRCCommandTest.test_roll_chromium_deps):
(IRCCommandTest.test_rollout):
* Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
(LayoutTestResultsReaderTest.test_missing_layout_test_results):
(test_missing_unit_test_results_path):
(test_layout_test_results):
* Scripts/webkitpy/tool/bot/queueengine_unittest.py:
(LoggingDelegate.process_work_item):
(LoggingDelegate.handle_unexpected_error):
(QueueEngineTest.test_trivial):
(QueueEngineTest.test_unexpected_error):
(QueueEngineTest.test_handled_error):
(QueueEngineTest._test_terminating_queue):
* Scripts/webkitpy/tool/commands/openbugs_unittest.py:
(OpenBugsTest.test_find_bugs_in_string):
* Scripts/webkitpy/tool/commands/queries_unittest.py:
(FailureReasonTest.test_blame_line_for_revision):
(PrintExpectationsTest.run_test):
(PrintBaselinesTest.test_basic):
(PrintBaselinesTest.test_multiple):
(PrintBaselinesTest.test_csv):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(AbstractQueueTest.test_log_directory):
(AbstractPatchQueueTest.test_next_patch):
(test_auto_retry):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline_updates_expectations_file):
(test_rebaseline_does_not_include_overrides):
(test_rebaseline_test):
(test_rebaseline_test_with_results_directory):
(test_rebaseline_test_and_print_scm_changes):
(test_rebaseline_and_copy_test):
(test_rebaseline_and_copy_test_no_existing_result):
(test_rebaseline_and_copy_test_with_lion_result):
(test_rebaseline_and_copy_no_overwrite_test):
(test_rebaseline_test_internal_with_move_overwritten_baselines_to):
(TestRebaselineJson.test_rebaseline_all):
(TestRebaselineJson.test_rebaseline_debug):
(TestRebaselineJson.test_move_overwritten):
(TestRebaselineJson.test_no_optimize):
(TestRebaselineJson.test_results_directory):
(TestRebaseline.test_rebaseline):
(TestRebaselineExpectations.test_rebaseline_expectations_noop):
(TestRebaselineExpectations.disabled_test_overrides_are_included_correctly):
(TestAnalyzeBaselines.test_default):
(TestAnalyzeBaselines.test_missing_baselines):
* Scripts/webkitpy/tool/commands/roll_unittest.py:
(PostRollCommandsTest.test_prepare_state):
* Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
(BuildCoverageExtrapolatorTest.test_extrapolate):
* Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py:
(AddSvnMimetypeForPngTest.test_run):
* Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
(PrepareChangeLogTest.test_ensure_bug_url):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
(_assert_message_for_revert_output):
* TestResultServer/model/jsonresults_unittest.py:
(JsonResultsTest._test_merge):
(JsonResultsTest._test_get_test_list):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134636 268f45cc-cd09-0410-ab3c-d52691b4dbfc

96 files changed:
Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py
Tools/ChangeLog
Tools/QueueStatusServer/model/queuepropertymixin_unittest.py
Tools/QueueStatusServer/model/queues_unittest.py
Tools/QueueStatusServer/model/workitems_unittest.py
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py
Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
Tools/Scripts/webkitpy/common/config/ports_unittest.py
Tools/Scripts/webkitpy/common/config/urls_unittest.py
Tools/Scripts/webkitpy/common/find_files_unittest.py
Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
Tools/Scripts/webkitpy/common/net/credentials_unittest.py
Tools/Scripts/webkitpy/common/net/failuremap_unittest.py
Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
Tools/Scripts/webkitpy/common/net/unittestresults_unittest.py
Tools/Scripts/webkitpy/common/read_checksum_from_png_unittest.py
Tools/Scripts/webkitpy/common/system/deprecated_logging_unittest.py
Tools/Scripts/webkitpy/common/system/executive_unittest.py
Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
Tools/Scripts/webkitpy/common/system/logtesting.py
Tools/Scripts/webkitpy/common/system/logutils_unittest.py
Tools/Scripts/webkitpy/common/system/outputcapture.py
Tools/Scripts/webkitpy/common/system/path_unittest.py
Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
Tools/Scripts/webkitpy/common/system/user_unittest.py
Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py
Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/builders_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/http_lock_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/image_diff_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
Tools/Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py
Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py
Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py
Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py
Tools/Scripts/webkitpy/style/checker_unittest.py
Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py
Tools/Scripts/webkitpy/style/checkers/common_unittest.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
Tools/Scripts/webkitpy/style/checkers/png_unittest.py
Tools/Scripts/webkitpy/style/checkers/python_unittest.py
Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
Tools/Scripts/webkitpy/style/checkers/text_unittest.py
Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py
Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py
Tools/Scripts/webkitpy/style/checkers/xml_unittest.py
Tools/Scripts/webkitpy/style/error_handlers_unittest.py
Tools/Scripts/webkitpy/style/filereader_unittest.py
Tools/Scripts/webkitpy/style/filter_unittest.py
Tools/Scripts/webkitpy/style/main_unittest.py
Tools/Scripts/webkitpy/style/optparser_unittest.py
Tools/Scripts/webkitpy/style/patchreader_unittest.py
Tools/Scripts/webkitpy/test/finder_unittest.py
Tools/Scripts/webkitpy/test/main_unittest.py
Tools/Scripts/webkitpy/test/runner_unittest.py
Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
Tools/Scripts/webkitpy/tool/bot/expectedfailures_unittest.py
Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py
Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py
Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py
Tools/Scripts/webkitpy/tool/commands/openbugs_unittest.py
Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
Tools/Scripts/webkitpy/tool/commands/roll_unittest.py
Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py
Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py
Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py
Tools/TestResultServer/model/jsonresults_unittest.py

index d1614c0..ae21e23 100755 (executable)
@@ -61,7 +61,7 @@ class MasterCfgTest(unittest.TestCase):
             '1 unique leaks found!',
         ]
         run_webkit_tests._parseNewRunWebKitTestsOutput(log_text)
-        self.assertEquals(run_webkit_tests.incorrectLayoutLines, expected_incorrect_lines)
+        self.assertEqual(run_webkit_tests.incorrectLayoutLines, expected_incorrect_lines)
 
 
 class StubStdio(object):
@@ -354,7 +354,7 @@ class SVNMirrorTest(unittest.TestCase):
             for buildStepFactory, kwargs in builder['factory'].steps:
                 if str(buildStepFactory).split('.')[-1] == 'CheckOutSource':
                         CheckOutSourceInstance = buildStepFactory(**kwargs)
-                        self.assertEquals(CheckOutSourceInstance.baseURL, self.get_SVNMirrorFromConfig(builder['name']))
+                        self.assertEqual(CheckOutSourceInstance.baseURL, self.get_SVNMirrorFromConfig(builder['name']))
 
 
 class BuildStepsConstructorTest(unittest.TestCase):
index d28ac86..1c0f607 100644 (file)
@@ -1,3 +1,544 @@
+2012-11-14  Zan Dobersek  <zandobersek@gmail.com>
+
+        Remove uses of deprecated unittest.TestCase aliases
+        https://bugs.webkit.org/show_bug.cgi?id=102253
+
+        Reviewed by Dirk Pranke.
+
+        Replace the deprecated unittest.TestCase methods with the corresponding methods
+        everywhere inside the Tools directory. The following replacements are done:
+        - assertEquals -> assertEqual
+        - assert_ -> assertTrue
+        - failUnlessRaises -> assertRaises
+
+        * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
+        (SVNMirrorTest.test_CheckOutSource):
+        * QueueStatusServer/model/queuepropertymixin_unittest.py:
+        (QueuePropertyMixinTest.test_queue_property):
+        * QueueStatusServer/model/queues_unittest.py:
+        (QueueTest._assert_short_name):
+        (QueueTest._assert_display_name):
+        (QueueTest._assert_name_with_underscores):
+        * QueueStatusServer/model/workitems_unittest.py:
+        (WorkItemsTest.test_display_position_for_attachment):
+        * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+        (test_parse_log_entries_from_changelog):
+        (test_parse_log_entries_from_annotated_file):
+        (_assert_parse_reviewer_text_and_list):
+        (_assert_parse_reviewer_text_list):
+        (_assert_fuzzy_reviewer_match):
+        (_assert_parse_authors):
+        (test_latest_entry_parse):
+        (test_latest_entry_parse_single_entry):
+        (test_set_reviewer):
+        (test_set_short_description_and_bug_url):
+        * Scripts/webkitpy/common/checkout/diff_parser_unittest.py:
+        (DiffParserTest.test_diff_parser):
+        * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+        (GitSVNTest.test_revisions_changing_files_with_local_commit):
+        (GitSVNTest.test_upstream_branch):
+        (GitSVNTest.test_create_patch_with_rm_and_changed_files):
+        (GitTestWithMock.test_push_local_commits_to_server_with_username_and_password):
+        * Scripts/webkitpy/common/config/ports_unittest.py:
+        (DeprecatedPortTest.test_mac_port):
+        (DeprecatedPortTest.test_gtk_port):
+        (DeprecatedPortTest.test_efl_port):
+        (DeprecatedPortTest.test_qt_port):
+        (DeprecatedPortTest.test_chromium_port):
+        (DeprecatedPortTest.test_chromium_android_port):
+        (DeprecatedPortTest.test_chromium_xvfb_port):
+        * Scripts/webkitpy/common/config/urls_unittest.py:
+        (URLsTest.test_parse_bug_id):
+        (URLsTest.test_parse_attachment_id):
+        * Scripts/webkitpy/common/find_files_unittest.py:
+        (TestWinNormalize.assert_filesystem_normalizes):
+        * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+        (test_url_creation):
+        (test_parse_bug_id):
+        (_assert_dictionaries_equal):
+        (test_parse_bugs_from_xml):
+        (test_attachment_detail_bug_parsing):
+        (_assert_result_count):
+        (test_request_page_parsing):
+        (test_quip_page_parsing):
+        (EditUsersParserTest._assert_login_userid_pairs):
+        * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+        (test_status_parsing):
+        (test_latest_cached_build):
+        (test_results_zip_url):
+        * Scripts/webkitpy/common/net/credentials_unittest.py:
+        (test_credentials_from_environment):
+        * Scripts/webkitpy/common/net/failuremap_unittest.py:
+        (FailureMapTest.test_failing_revisions):
+        (FailureMapTest.test_new_failures):
+        (FailureMapTest.test_new_failures_with_old_revisions):
+        (FailureMapTest.test_new_failures_with_more_old_revisions):
+        (FailureMapTest.test_tests_failing_for):
+        (FailureMapTest.test_failing_tests):
+        * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+        (LayoutTestResultsTest.test_set_failure_limit_count):
+        * Scripts/webkitpy/common/net/unittestresults_unittest.py:
+        (UnitTestResultsTest.test_nostring):
+        (UnitTestResultsTest.test_emptystring):
+        * Scripts/webkitpy/common/read_checksum_from_png_unittest.py:
+        (ReadChecksumFromPngTest.test_read_checksum):
+        * Scripts/webkitpy/common/system/deprecated_logging_unittest.py:
+        (LoggingTest.assert_log_equals):
+        * Scripts/webkitpy/common/system/executive_unittest.py:
+        (ScriptErrorTest.test_string_from_args):
+        (ScriptErrorTest.test_message_with_output):
+        (ExecutiveTest.test_run_command_with_bad_command):
+        (ExecutiveTest.test_run_command_with_unicode):
+        (ExecutiveTest.serial_test_run_in_parallel):
+        * Scripts/webkitpy/common/system/filesystem_mock_unittest.py:
+        (MockFileSystemTest.quick_check):
+        * Scripts/webkitpy/common/system/filesystem_unittest.py:
+        (GenericFileSystemTests.test_glob__trailing_asterisk):
+        (GenericFileSystemTests.test_glob__leading_asterisk):
+        (GenericFileSystemTests.test_glob__middle_asterisk):
+        (GenericFileSystemTests.test_glob__period_is_escaped):
+        (RealFileSystemTest.test_chdir):
+        (RealFileSystemTest.test_remove_file_with_retry):
+        (RealFileSystemTest.test_sep):
+        * Scripts/webkitpy/common/system/logtesting.py:
+        (TestLogStream.assertMessages):
+        * Scripts/webkitpy/common/system/logutils_unittest.py:
+        (GetLoggerTest.test_get_logger_in_webkitpy):
+        (GetLoggerTest.test_get_logger_not_in_webkitpy):
+        * Scripts/webkitpy/common/system/outputcapture.py:
+        (OutputCaptureTestCaseBase.assertStdout):
+        (OutputCaptureTestCaseBase.assertStderr):
+        * Scripts/webkitpy/common/system/path_unittest.py:
+        (AbspathTest.test_abspath_to_uri_cygwin):
+        (AbspathTest.test_abspath_to_uri_unixy):
+        (AbspathTest.test_abspath_to_uri_win):
+        (AbspathTest.test_abspath_to_uri_escaping_unixy):
+        (AbspathTest.test_abspath_to_uri_escaping_cygwin):
+        * Scripts/webkitpy/common/system/platforminfo_unittest.py:
+        (TestPlatformInfo.test_real_code):
+        (TestPlatformInfo.test_os_name_and_wrappers):
+        (TestPlatformInfo.test_os_version):
+        (TestPlatformInfo.test_total_bytes_memory):
+        * Scripts/webkitpy/common/system/user_unittest.py:
+        (UserTest.test_confirm.mock_raw_input):
+        (UserTest.test_confirm):
+        * Scripts/webkitpy/common/system/zipfileset_unittest.py:
+        (ZipFileSetTest.test_open):
+        (ZipFileSetTest.test_read):
+        * Scripts/webkitpy/common/watchlist/watchlist_unittest.py:
+        (WatchListTest.test_filename_definition_no_matches):
+        (WatchListTest.test_filename_definition):
+        (WatchListTest.test_cc_rules_simple):
+        (WatchListTest.test_cc_rules_complex):
+        (WatchListTest.test_cc_and_message_rules_complex):
+        (WatchListTest.test_cc_and_message_rules_no_matches):
+        (WatchListTest.test_added_match):
+        (WatchListTest.test_deleted_match):
+        (WatchListTest.test_more_and_less_match):
+        (WatchListTest.test_complex_match):
+        * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+        (LockCheckingRunner.handle_finished_list):
+        (LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
+        (LayoutTestRunnerTests.test_update_summary_with_result):
+        (LayoutTestRunnerTests.test_servers_started):
+        (SharderTests.assert_shards):
+        (SharderTests.test_shard_in_two_has_no_locked_shards):
+        (SharderTests.test_shard_in_two_has_no_unlocked_shards):
+        (NaturalCompareTest.assert_cmp):
+        (KeyCompareTest.assert_cmp):
+        * Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py:
+        (TestConfigurationTest.test_items):
+        (TestConfigurationTest.test_keys):
+        (TestConfigurationTest.test_str):
+        (TestConfigurationTest.test_repr):
+        (TestConfigurationTest.test_hash):
+        (TestConfigurationTest.test_eq):
+        (TestConfigurationTest.test_values):
+        (SpecifierSorterTest.test_init):
+        (SpecifierSorterTest.test_add_specifier):
+        (SpecifierSorterTest.test_add_macros):
+        (SpecifierSorterTest.test_category_priority):
+        (SpecifierSorterTest.test_specifier_priority):
+        (SpecifierSorterTest.test_sort_specifiers):
+        (TestConfigurationConverterTest.test_symmetric_difference):
+        (TestConfigurationConverterTest.test_to_config_set):
+        (TestConfigurationConverterTest.test_macro_expansion):
+        (TestConfigurationConverterTest.test_to_specifier_lists):
+        (TestConfigurationConverterTest.test_macro_collapsing):
+        (TestConfigurationConverterTest.test_converter_macro_collapsing):
+        (TestConfigurationConverterTest.test_specifier_converter_access):
+        * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+        (assert_exp):
+        (MiscTests.test_result_was_expected):
+        (MiscTests.test_remove_pixel_failures):
+        (MiscTests.test_suffixes_for_expectations):
+        (MiscTests.test_get_expectations_string):
+        (SkippedTests.check):
+        (ExpectationSyntaxTests.assert_tokenize_exp):
+        (SemanticTests.test_bad_bugid):
+        (SemanticTests.test_missing_bugid):
+        (TestExpectationSerializationTests.test_reconstitute_only_these):
+        * Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:
+        (TestFailuresTest.test_crashes):
+        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+        (PortTest.test_nonexistant_expectations):
+        (PortTest.test_additional_expectations):
+        * Scripts/webkitpy/layout_tests/port/builders_unittest.py:
+        (BuildersTest.test_path_from_name):
+        * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+        (ChromiumAndroidPortTest.test_attributes):
+        (ChromiumAndroidPortTest.test_default_timeout_ms):
+        (ChromiumAndroidPortTest.test_get_devices_one_device):
+        (ChromiumAndroidPortTest.test_get_devices_two_devices):
+        (ChromiumAndroidPortTest.test_get_device_serial_one_device):
+        (ChromiumAndroidPortTest.test_get_device_serial_two_devices):
+        (ChromiumAndroidPortTest.test_must_require_http_server):
+        (ChromiumAndroidDriverTest.test_get_last_stacktrace):
+        (ChromiumAndroidDriverTest.test_get_crash_log):
+        (ChromiumAndroidDriverTest.test_cmd_line):
+        (ChromiumAndroidDriverTest.test_read_prompt):
+        (ChromiumAndroidDriverTest.test_command_from_driver_input):
+        (ChromiumAndroidDriverTwoDriversTest.test_two_drivers):
+        (ChromiumAndroidTwoPortsTest.test_options_with_two_ports):
+        * Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py:
+        (ChromiumLinuxPortTest.assert_architecture):
+        (ChromiumLinuxPortTest.test_determine_architecture_fails):
+        (ChromiumLinuxPortTest.test_path_to_image_diff):
+        * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+        (ChromiumMacPortTest.assert_name):
+        (ChromiumMacPortTest.test_baseline_path):
+        (ChromiumMacPortTest.test_path_to_image_diff):
+        * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+        (ChromiumPortTestCase.test_default_max_locked_shards):
+        (ChromiumPortTestCase.test_default_timeout_ms):
+        (ChromiumPortTestCase.test_default_pixel_tests):
+        (ChromiumPortTestCase.test_all_test_configurations):
+        (ChromiumPortTestCase.test_default_configuration):
+        (ChromiumPortTestCase.test_diff_image):
+        (ChromiumPortTestCase.test_diff_image_crashed):
+        (ChromiumPortTestCase.test_expectations_files):
+        * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+        (ChromiumWinTest.test_setup_environ_for_server_cygpath):
+        (ChromiumWinTest.assert_name):
+        (ChromiumWinTest.test_baseline_path):
+        (ChromiumWinTest.test_path_to_image_diff):
+        * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
+        (DriverTest.test_read_block):
+        (DriverTest.test_read_binary_block):
+        (DriverTest.test_read_base64_block):
+        (DriverTest.test_no_timeout):
+        (DriverTest.test_check_for_driver_crash.assert_crash):
+        (DriverTest.test_creating_a_port_does_not_write_to_the_filesystem):
+        * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
+        (FactoryTest.test_get_from_builder_name):
+        * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+        (GtkPortTest.test_default_timeout_ms):
+        * Scripts/webkitpy/layout_tests/port/http_lock_unittest.py:
+        (HttpLockTest.test_current_lock_pid):
+        * Scripts/webkitpy/layout_tests/port/image_diff_unittest.py:
+        (TestImageDiffer.test_diff_image_failed):
+        (TestImageDiffer.test_diff_image_passed):
+        * Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py:
+        (LeakDetectorTest.test_leaks_args):
+        (test_parse_leaks_output):
+        (test_leaks_files_in_directory):
+        (test_count_total_leaks):
+        * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+        (MacTest.test_default_timeout_ms):
+        (assert_name):
+        (test_setup_environ_for_server):
+        (_assert_search_path):
+        (test_32bit):
+        (test_64bit):
+        * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+        (MockTestShellTest.test_pixeltest__fails):
+        (MockTestShellTest.test_test_shell_parse_options):
+        * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+        (PortTestCase.test_default_max_locked_shards):
+        (PortTestCase.test_default_timeout_ms):
+        (PortTestCase.test_default_pixel_tests):
+        (PortTestCase.test_diff_image):
+        (PortTestCase.test_diff_image_crashed):
+        (PortTestCase.test_get_crash_log):
+        (PortTestCase.assert_build_path):
+        (PortTestCase.test_expectations_ordering):
+        (_assert_config_file_for_platform):
+        (test_path_to_apache_config_file):
+        (test_additional_platform_directory):
+        * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+        (QtPortTest._assert_search_path):
+        (QtPortTest._assert_expectations_files):
+        (QtPortTest.test_setup_environ_for_server):
+        * Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
+        (TestServerProcess.test_basic):
+        (TestServerProcess.test_broken_pipe):
+        * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+        (WinPortTest._assert_search_path):
+        (WinPortTest._assert_version):
+        (WinPortTest.test_runtime_feature_list):
+        (WinPortTest.test_expectations_files):
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+        (LintTest.test_all_configurations):
+        (MainTest.test_all):
+        (MainTest.test_repeat_each):
+        (MainTest.test_skipped_flag):
+        (MainTest.test_iterations):
+        (MainTest.test_run_chunk):
+        (MainTest.test_run_part):
+        (MainTest.test_run_singly):
+        (MainTest.test_run_singly_actually_runs_tests):
+        (MainTest.test_single_file):
+        (MainTest.test_single_file_with_prefix):
+        (MainTest.test_single_skipped_file):
+        (MainTest.test_stderr_is_saved):
+        (MainTest.test_test_list):
+        (MainTest.test_test_list_with_prefix):
+        (MainTest.test_missing_and_unexpected_results):
+        (MainTest.test_pixel_test_directories):
+        (MainTest.test_missing_and_unexpected_results_with_custom_exit_code):
+        (MainTest.test_crash_log):
+        (MainTest.test_web_process_crash_log):
+        (MainTest.test_exit_after_n_failures_upload):
+        (MainTest.test_exit_after_n_failures):
+        (MainTest.test_exit_after_n_crashes):
+        (MainTest.test_retrying_and_flaky_tests):
+        (MainTest.test_run_order__inline):
+        (MainTest.test_reftest_run):
+        (MainTest.test_reftest_run_reftests_if_pixel_tests_are_disabled):
+        (MainTest.test_reftest_skip_reftests_if_no_ref_tests):
+        (MainTest.test_reftest_expected_html_should_be_ignored):
+        (MainTest.test_reftest_driver_should_run_expected_html):
+        (MainTest.test_reftest_driver_should_run_expected_mismatch_html):
+        (MainTest.test_output_diffs):
+        (MainTest.test_unsupported_platform):
+        (EndToEndTest.test_end_to_end):
+        (RebaselineTest.test_reset_results):
+        (RebaselineTest.test_missing_results):
+        (RebaselineTest.test_new_baseline):
+        * Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py:
+        (BaseTest.integration_test_server__normal):
+        (BaseTest.integration_test_server__fails):
+        (BaseTest.integration_test_port_and_root):
+        * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+        (TestHttpServer.test_start_cmd):
+        * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
+        (RegularTest.test_logging_not_included):
+        (RegularTest._basic):
+        (RegularTest.test_basic):
+        (RegularTest.test_log_after_update):
+        (RegularTest.test_log_args):
+        (TtyTest.test_basic):
+        (TtyTest.test_log_after_update):
+        (VerboseTest.test_basic):
+        (VerboseTest.test_log_after_update):
+        (VerboseTest.test_log_args):
+        * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+        (Testprinter.assertWritten):
+        (test_test_status_line):
+        * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+        (MainTest.assertWritten):
+        * Scripts/webkitpy/style/checker_unittest.py:
+        (GlobalVariablesTest.test_webkit_base_filter_rules):
+        (CheckerDispatcherSkipTest._assert_should_skip_without_warning):
+        (CheckerDispatcherCarriageReturnTest.test_should_check_and_strip_carriage_returns):
+        (CheckerDispatcherDispatchTest.assert_checker):
+        (CheckerDispatcherDispatchTest.test_changelog_paths):
+        (CheckerDispatcherDispatchTest.test_cpp_paths):
+        (CheckerDispatcherDispatchTest.test_json_paths):
+        (CheckerDispatcherDispatchTest.test_python_paths):
+        (CheckerDispatcherDispatchTest.test_text_paths):
+        (CheckerDispatcherDispatchTest.test_xml_paths):
+        (StyleProcessorConfigurationTest.test_init):
+        (StyleProcessorConfigurationTest.test_write_style_error_emacs):
+        (StyleProcessorConfigurationTest.test_write_style_error_vs7):
+        (StyleProcessor_EndToEndTest.test_init):
+        (StyleProcessor_EndToEndTest.test_process):
+        (StyleProcessor_CodeCoverageTest.test_process__checker_dispatched):
+        * Scripts/webkitpy/style/checkers/changelog_unittest.py:
+        (ChangeLogCheckerTest.assert_error.handle_style_error):
+        (ChangeLogCheckerTest.test_init):
+        * Scripts/webkitpy/style/checkers/common_unittest.py:
+        (CarriageReturnCheckerTest.assert_carriage_return):
+        (TabCheckerTest.assert_tab):
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (CppFunctionsTest.test_convert_to_lower_with_underscores):
+        (CppFunctionsTest.test_create_acronym):
+        (CppFunctionsTest.test_parameter):
+        (CppFunctionsTest.test_single_line_view):
+        (CppFunctionsTest.test_create_skeleton_parameters):
+        (CppFunctionsTest.test_find_parameter_name_index):
+        (CppFunctionsTest.test_parameter_list):
+        (CppFunctionsTest.test_check_parameter_against_text):
+        (CppStyleTestBase.perform_lint):
+        (CppStyleTestBase.assert_lint):
+        (CppStyleTestBase.assert_lint_one_of_many_errors_re):
+        (CppStyleTestBase.assert_multi_line_lint):
+        (CppStyleTestBase.assert_language_rules_check):
+        (CppStyleTestBase.assert_include_what_you_use):
+        (CppStyleTestBase.assert_blank_lines_check):
+        (CppStyleTestBase.assert_positions_equal):
+        (FunctionDetectionTest.perform_function_detection):
+        (CppStyleTest.test_get_line_width):
+        (CppStyleTest.test_find_next_multi_line_comment_start):
+        (CppStyleTest.test_find_next_multi_line_comment_end):
+        (CppStyleTest.test_remove_multi_line_comments_from_range):
+        (CppStyleTest.test_position):
+        (CppStyleTest.test_rfind_in_lines):
+        (CppStyleTest.test_close_expression):
+        (CppStyleTest.test_include_what_you_use_no_implementation_files):
+        (CppStyleTest.test_include_what_you_use):
+        (CppStyleTest.test_files_belong_to_same_module):
+        (CppStyleTest.test_cleanse_line):
+        (CppStyleTest.test_multiline_strings):
+        (CppStyleTest.test_newline_at_eof.do_test):
+        (CppStyleTest.test_invalid_utf8.do_test):
+        (CppStyleTest.test_is_blank_line):
+        (CppStyleTest.test_allow_blank_line_before_closing_namespace):
+        (CppStyleTest.test_allow_blank_line_before_if_else_chain):
+        (CppStyleTest.test_else_on_same_line_as_closing_braces):
+        (CppStyleTest.test_build_header_guard):
+        (CppStyleTest.test_legal_copyright):
+        (CleansedLinesTest.test_init):
+        (CleansedLinesTest.test_init_empty):
+        (CleansedLinesTest.test_collapse_strings):
+        (CheckForFunctionLengthsTest.assert_function_lengths_check):
+        (PassPtrTest.assert_pass_ptr_check):
+        (LeakyPatternTest.assert_leaky_pattern_check):
+        (WebKitStyleTest.test_parameter_names):
+        (WebKitStyleTest.test_webkit_export_check):
+        (CppCheckerTest.test_init):
+        * Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:
+        (JSONCheckerTest.assert_error.handle_style_error):
+        (JSONCheckerTest.test_init):
+        * Scripts/webkitpy/style/checkers/png_unittest.py:
+        (PNGCheckerTest.test_init):
+        (PNGCheckerTest.test_check):
+        * Scripts/webkitpy/style/checkers/python_unittest.py:
+        (PythonCheckerTest.test_init):
+        (PythonCheckerTest.test_check):
+        * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+        (TestExpectationsTestCase._expect_port_for_expectations_path):
+        (TestExpectationsTestCase.assert_lines_lint):
+        * Scripts/webkitpy/style/checkers/text_unittest.py:
+        (TextStyleTestCase.assertNoError):
+        (TextStyleTestCase.assertError.error_for_test):
+        (TextStyleTestCase.assertError):
+        (TextCheckerTest.test_init):
+        * Scripts/webkitpy/style/checkers/watchlist_unittest.py:
+        (WatchListTest.test_basic_error_message.handle_style_error):
+        (WatchListTest):
+        * Scripts/webkitpy/style/checkers/xcodeproj_unittest.py:
+        (XcodeProjectFileCheckerTest.assert_error):
+        * Scripts/webkitpy/style/checkers/xml_unittest.py:
+        (XMLCheckerTest.assert_error.handle_style_error):
+        (XMLCheckerTest.test_init):
+        * Scripts/webkitpy/style/error_handlers_unittest.py:
+        (DefaultStyleErrorHandlerTest._check_initialized):
+        (DefaultStyleErrorHandlerTest.test_non_reportable_error):
+        (DefaultStyleErrorHandlerTest.test_max_reports_per_category):
+        (DefaultStyleErrorHandlerTest.test_line_numbers):
+        * Scripts/webkitpy/style/filereader_unittest.py:
+        (TextFileReaderTest._assert_file_reader):
+        (TextFileReaderTest.test_process_file__does_not_exist):
+        (TextFileReaderTest.test_count_delete_only_file):
+        * Scripts/webkitpy/style/filter_unittest.py:
+        (CategoryFilterTest.test_init):
+        (CategoryFilterTest.test_init_default_arguments):
+        (CategoryFilterTest.test_str):
+        (FilterConfigurationTest.test_init):
+        (FilterConfigurationTest.test_default_arguments):
+        * Scripts/webkitpy/style/main_unittest.py:
+        (ChangeDirectoryTest._assert_result):
+        * Scripts/webkitpy/style/optparser_unittest.py:
+        (ArgumentPrinterTest.test_to_flag_string):
+        (ArgumentParserTest.test_parse_default_arguments):
+        (ArgumentParserTest.test_parse_explicit_arguments):
+        (ArgumentParserTest.test_parse_files):
+        (CommandOptionValuesTest.test_init):
+        * Scripts/webkitpy/style/patchreader_unittest.py:
+        (PatchReaderTest._assert_checked):
+        * Scripts/webkitpy/test/finder_unittest.py:
+        (FinderTest.test_additional_system_paths):
+        (FinderTest.test_to_module):
+        (FinderTest.check_names):
+        * Scripts/webkitpy/test/main_unittest.py:
+        (TesterTest.test_individual_names_are_not_run_twice):
+        (TesterTest.test_integration_tests_are_not_found_by_default):
+        (TesterTest.test_integration_tests_are_found):
+        (TesterTest.integration_test_coverage_works):
+        * Scripts/webkitpy/test/runner_unittest.py:
+        (RunnerTest.test_run):
+        * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+        (_expect_validate):
+        * Scripts/webkitpy/tool/bot/expectedfailures_unittest.py:
+        (ExpectedFailuresTest._assert_can_trust):
+        (ExpectedFailuresTest.test_unexpected_failures_observed):
+        (ExpectedFailuresTest.test_unexpected_failures_observed_when_tree_is_hosed):
+        * Scripts/webkitpy/tool/bot/feeders_unittest.py:
+        (test_patches_with_acceptable_review_flag):
+        * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+        (IRCCommandTest.test_whois):
+        (IRCCommandTest.test_create_bug):
+        (IRCCommandTest.test_roll_chromium_deps):
+        (IRCCommandTest.test_rollout):
+        * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
+        (LayoutTestResultsReaderTest.test_missing_layout_test_results):
+        (test_missing_unit_test_results_path):
+        (test_layout_test_results):
+        * Scripts/webkitpy/tool/bot/queueengine_unittest.py:
+        (LoggingDelegate.process_work_item):
+        (LoggingDelegate.handle_unexpected_error):
+        (QueueEngineTest.test_trivial):
+        (QueueEngineTest.test_unexpected_error):
+        (QueueEngineTest.test_handled_error):
+        (QueueEngineTest._test_terminating_queue):
+        * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
+        (OpenBugsTest.test_find_bugs_in_string):
+        * Scripts/webkitpy/tool/commands/queries_unittest.py:
+        (FailureReasonTest.test_blame_line_for_revision):
+        (PrintExpectationsTest.run_test):
+        (PrintBaselinesTest.test_basic):
+        (PrintBaselinesTest.test_multiple):
+        (PrintBaselinesTest.test_csv):
+        * Scripts/webkitpy/tool/commands/queues_unittest.py:
+        (AbstractQueueTest.test_log_directory):
+        (AbstractPatchQueueTest.test_next_patch):
+        (test_auto_retry):
+        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+        (test_rebaseline_updates_expectations_file):
+        (test_rebaseline_does_not_include_overrides):
+        (test_rebaseline_test):
+        (test_rebaseline_test_with_results_directory):
+        (test_rebaseline_test_and_print_scm_changes):
+        (test_rebaseline_and_copy_test):
+        (test_rebaseline_and_copy_test_no_existing_result):
+        (test_rebaseline_and_copy_test_with_lion_result):
+        (test_rebaseline_and_copy_no_overwrite_test):
+        (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
+        (TestRebaselineJson.test_rebaseline_all):
+        (TestRebaselineJson.test_rebaseline_debug):
+        (TestRebaselineJson.test_move_overwritten):
+        (TestRebaselineJson.test_no_optimize):
+        (TestRebaselineJson.test_results_directory):
+        (TestRebaseline.test_rebaseline):
+        (TestRebaselineExpectations.test_rebaseline_expectations_noop):
+        (TestRebaselineExpectations.disabled_test_overrides_are_included_correctly):
+        (TestAnalyzeBaselines.test_default):
+        (TestAnalyzeBaselines.test_missing_baselines):
+        * Scripts/webkitpy/tool/commands/roll_unittest.py:
+        (PostRollCommandsTest.test_prepare_state):
+        * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+        (BuildCoverageExtrapolatorTest.test_extrapolate):
+        * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py:
+        (AddSvnMimetypeForPngTest.test_run):
+        * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
+        (PrepareChangeLogTest.test_ensure_bug_url):
+        * Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
+        (_assert_message_for_revert_output):
+        * TestResultServer/model/jsonresults_unittest.py:
+        (JsonResultsTest._test_merge):
+        (JsonResultsTest._test_get_test_list):
+
 2012-11-14  János Badics  <jbadics@inf.u-szeged.hu>
 
         [Qt][ARM] Fix 'nullptr' is a keyword in C++11 [-Wc++0x-compat] warning
index 9a301fe..e83c3f5 100644 (file)
@@ -42,10 +42,10 @@ class QueuePropertyMixinTest(unittest.TestCase):
         test_object = ObjectWithQueueName()
         mac_ews = Queue("mac-ews")
         test_object.queue = mac_ews
-        self.assertEquals(test_object.queue.name(), "mac-ews")
-        self.assertEquals(test_object.queue_name, "mac-ews")
+        self.assertEqual(test_object.queue.name(), "mac-ews")
+        self.assertEqual(test_object.queue_name, "mac-ews")
         test_object.queue = None
-        self.assertEquals(test_object.queue_name, None)
+        self.assertEqual(test_object.queue_name, None)
 
 
 if __name__ == '__main__':
index cfa7fcd..654c8a6 100644 (file)
@@ -43,7 +43,7 @@ class QueueTest(unittest.TestCase):
         self.assertRaises(AssertionError, Queue, ("bogus"))
 
     def _assert_short_name(self, queue_name, short_name):
-        self.assertEquals(Queue(queue_name).short_name(), short_name)
+        self.assertEqual(Queue(queue_name).short_name(), short_name)
 
     def test_short_name(self):
         self._assert_short_name("mac-ews", "Mac")
@@ -52,7 +52,7 @@ class QueueTest(unittest.TestCase):
         self._assert_short_name("style-queue", "Style")
 
     def _assert_display_name(self, queue_name, short_name):
-        self.assertEquals(Queue(queue_name).display_name(), short_name)
+        self.assertEqual(Queue(queue_name).display_name(), short_name)
 
     def test_display_name(self):
         self._assert_display_name("mac-ews", "Mac EWS")
@@ -61,7 +61,7 @@ class QueueTest(unittest.TestCase):
         self._assert_display_name("style-queue", "Style Queue")
 
     def _assert_name_with_underscores(self, queue_name, short_name):
-        self.assertEquals(Queue(queue_name).name_with_underscores(), short_name)
+        self.assertEqual(Queue(queue_name).name_with_underscores(), short_name)
 
     def test_name_with_underscores(self):
         self._assert_name_with_underscores("mac-ews", "mac_ews")
index b1ff1d3..f6ca785 100644 (file)
@@ -36,9 +36,9 @@ class WorkItemsTest(unittest.TestCase):
     def test_display_position_for_attachment(self):
         items = WorkItems()
         items.item_ids = [0, 1, 2]
-        self.assertEquals(items.display_position_for_attachment(0), 1)
-        self.assertEquals(items.display_position_for_attachment(1), 2)
-        self.assertEquals(items.display_position_for_attachment(3), None)
+        self.assertEqual(items.display_position_for_attachment(0), 1)
+        self.assertEqual(items.display_position_for_attachment(1), 2)
+        self.assertEqual(items.display_position_for_attachment(3), None)
 
 
 if __name__ == '__main__':
index 9591744..fa2339f 100644 (file)
@@ -181,7 +181,7 @@ class ChangeLogTest(unittest.TestCase):
 
         '''
 
-        self.assertEquals(56988, parse_bug_id_from_changelog(commit_text))
+        self.assertEqual(56988, parse_bug_id_from_changelog(commit_text))
 
         commit_text = '''
 2011-03-23  Ojan Vafai  <ojan@chromium.org>
@@ -194,7 +194,7 @@ class ChangeLogTest(unittest.TestCase):
 
         '''
 
-        self.assertEquals(12345, parse_bug_id_from_changelog(commit_text))
+        self.assertEqual(12345, parse_bug_id_from_changelog(commit_text))
 
         commit_text = '''
 2011-03-31  Adam Roben  <aroben@apple.com>
@@ -213,7 +213,7 @@ class ChangeLogTest(unittest.TestCase):
 
         '''
 
-        self.assertEquals(57569, parse_bug_id_from_changelog(commit_text))
+        self.assertEqual(57569, parse_bug_id_from_changelog(commit_text))
 
         commit_text = '''
 2011-03-29  Timothy Hatcher  <timothy@apple.com>
@@ -230,24 +230,24 @@ class ChangeLogTest(unittest.TestCase):
         extract-localizable-strings does not complain about unbalanced single quotes.
         '''
 
-        self.assertEquals(57354, parse_bug_id_from_changelog(commit_text))
+        self.assertEqual(57354, parse_bug_id_from_changelog(commit_text))
 
     def test_parse_log_entries_from_changelog(self):
         changelog_file = StringIO(self._example_changelog)
         parsed_entries = list(ChangeLog.parse_entries_from_file(changelog_file))
-        self.assertEquals(len(parsed_entries), 9)
-        self.assertEquals(parsed_entries[0].reviewer_text(), "David Levin")
-        self.assertEquals(parsed_entries[1].author_email(), "ddkilzer@apple.com")
-        self.assertEquals(parsed_entries[2].reviewer_text(), "Mark Rowe")
-        self.assertEquals(parsed_entries[2].touched_files(), ["DumpRenderTree/mac/DumpRenderTreeWindow.mm"])
-        self.assertEquals(parsed_entries[3].author_name(), "Benjamin Poulain")
-        self.assertEquals(parsed_entries[3].touched_files(), ["platform/cf/KURLCFNet.cpp", "platform/mac/KURLMac.mm",
+        self.assertEqual(len(parsed_entries), 9)
+        self.assertEqual(parsed_entries[0].reviewer_text(), "David Levin")
+        self.assertEqual(parsed_entries[1].author_email(), "ddkilzer@apple.com")
+        self.assertEqual(parsed_entries[2].reviewer_text(), "Mark Rowe")
+        self.assertEqual(parsed_entries[2].touched_files(), ["DumpRenderTree/mac/DumpRenderTreeWindow.mm"])
+        self.assertEqual(parsed_entries[3].author_name(), "Benjamin Poulain")
+        self.assertEqual(parsed_entries[3].touched_files(), ["platform/cf/KURLCFNet.cpp", "platform/mac/KURLMac.mm",
             "WebCoreSupport/ChromeClientEfl.cpp", "ewk/ewk_private.h", "ewk/ewk_view.cpp"])
-        self.assertEquals(parsed_entries[4].reviewer_text(), "David Hyatt")
-        self.assertEquals(parsed_entries[5].reviewer_text(), "Adam Roben")
-        self.assertEquals(parsed_entries[6].reviewer_text(), "Tony Chang")
-        self.assertEquals(parsed_entries[7].reviewer_text(), None)
-        self.assertEquals(parsed_entries[8].reviewer_text(), 'Darin Adler')
+        self.assertEqual(parsed_entries[4].reviewer_text(), "David Hyatt")
+        self.assertEqual(parsed_entries[5].reviewer_text(), "Adam Roben")
+        self.assertEqual(parsed_entries[6].reviewer_text(), "Tony Chang")
+        self.assertEqual(parsed_entries[7].reviewer_text(), None)
+        self.assertEqual(parsed_entries[8].reviewer_text(), 'Darin Adler')
 
     def test_parse_log_entries_from_annotated_file(self):
         # Note that there are trailing spaces on some of the lines intentionally.
@@ -285,28 +285,28 @@ class ChangeLogTest(unittest.TestCase):
             u"99187 andreas.kling@nokia.com \n")
 
         parsed_entries = list(ChangeLog.parse_entries_from_file(changelog_file))
-        self.assertEquals(parsed_entries[0].revision(), 100000)
-        self.assertEquals(parsed_entries[0].reviewer_text(), "Zoltan Herczeg")
-        self.assertEquals(parsed_entries[0].author_name(), u"Csaba Osztrogon\u00e1c")
-        self.assertEquals(parsed_entries[0].author_email(), "ossy@webkit.org")
-        self.assertEquals(parsed_entries[1].revision(), 93798)
-        self.assertEquals(parsed_entries[1].author_name(), "Alexey Proskuryakov")
-        self.assertEquals(parsed_entries[2].revision(), 99190)
-        self.assertEquals(parsed_entries[2].author_name(), "Andreas Kling")
-        self.assertEquals(parsed_entries[3].revision(), 99187)
-        self.assertEquals(parsed_entries[3].author_name(), "Andreas Kling")
+        self.assertEqual(parsed_entries[0].revision(), 100000)
+        self.assertEqual(parsed_entries[0].reviewer_text(), "Zoltan Herczeg")
+        self.assertEqual(parsed_entries[0].author_name(), u"Csaba Osztrogon\u00e1c")
+        self.assertEqual(parsed_entries[0].author_email(), "ossy@webkit.org")
+        self.assertEqual(parsed_entries[1].revision(), 93798)
+        self.assertEqual(parsed_entries[1].author_name(), "Alexey Proskuryakov")
+        self.assertEqual(parsed_entries[2].revision(), 99190)
+        self.assertEqual(parsed_entries[2].author_name(), "Andreas Kling")
+        self.assertEqual(parsed_entries[3].revision(), 99187)
+        self.assertEqual(parsed_entries[3].author_name(), "Andreas Kling")
 
     def _assert_parse_reviewer_text_and_list(self, text, expected_reviewer_text, expected_reviewer_text_list=None):
         reviewer_text, reviewer_text_list = ChangeLogEntry._parse_reviewer_text(text)
-        self.assertEquals(reviewer_text, expected_reviewer_text)
+        self.assertEqual(reviewer_text, expected_reviewer_text)
         if expected_reviewer_text_list:
-            self.assertEquals(reviewer_text_list, expected_reviewer_text_list)
+            self.assertEqual(reviewer_text_list, expected_reviewer_text_list)
         else:
-            self.assertEquals(reviewer_text_list, [expected_reviewer_text])
+            self.assertEqual(reviewer_text_list, [expected_reviewer_text])
 
     def _assert_parse_reviewer_text_list(self, text, expected_reviewer_text_list):
         reviewer_text, reviewer_text_list = ChangeLogEntry._parse_reviewer_text(text)
-        self.assertEquals(reviewer_text_list, expected_reviewer_text_list)
+        self.assertEqual(reviewer_text_list, expected_reviewer_text_list)
 
     def test_parse_reviewer_text(self):
         self._assert_parse_reviewer_text_and_list('  reviewed  by Ryosuke Niwa,   Oliver Hunt, and  Dimitri Glazkov',
@@ -388,8 +388,8 @@ class ChangeLogTest(unittest.TestCase):
 
     def _assert_fuzzy_reviewer_match(self, reviewer_text, expected_text_list, expected_contributors):
         unused, reviewer_text_list = ChangeLogEntry._parse_reviewer_text(reviewer_text)
-        self.assertEquals(reviewer_text_list, expected_text_list)
-        self.assertEquals(self._entry_with_reviewer(reviewer_text).reviewers(), self._contributors(expected_contributors))
+        self.assertEqual(reviewer_text_list, expected_text_list)
+        self.assertEqual(self._entry_with_reviewer(reviewer_text).reviewers(), self._contributors(expected_contributors))
 
     def test_fuzzy_reviewer_match__none(self):
         self._assert_fuzzy_reviewer_match('Reviewed by BUILD FIX', ['BUILD FIX'], [])
@@ -427,7 +427,7 @@ class ChangeLogTest(unittest.TestCase):
 
     def _assert_parse_authors(self, author_text, expected_contributors):
         parsed_authors = [(author['name'], author['email']) for author in self._entry_with_author(author_text).authors()]
-        self.assertEquals(parsed_authors, expected_contributors)
+        self.assertEqual(parsed_authors, expected_contributors)
 
     def test_parse_authors(self):
         self._assert_parse_authors(u'Aaron Colwell  <acolwell@chromium.org>', [(u'Aaron Colwell', u'acolwell@chromium.org')])
@@ -458,11 +458,11 @@ class ChangeLogTest(unittest.TestCase):
         changelog_contents = u"%s\n%s" % (self._example_entry, self._example_changelog)
         changelog_file = StringIO(changelog_contents)
         latest_entry = ChangeLog.parse_latest_entry_from_file(changelog_file)
-        self.assertEquals(latest_entry.contents(), self._example_entry)
-        self.assertEquals(latest_entry.author_name(), "Peter Kasting")
-        self.assertEquals(latest_entry.author_email(), "pkasting@google.com")
-        self.assertEquals(latest_entry.reviewer_text(), u"Tor Arne Vestb\xf8")
-        self.assertEquals(latest_entry.touched_files(), ["DumpRenderTree/win/DumpRenderTree.vcproj", "DumpRenderTree/win/ImageDiff.vcproj", "DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj"])
+        self.assertEqual(latest_entry.contents(), self._example_entry)
+        self.assertEqual(latest_entry.author_name(), "Peter Kasting")
+        self.assertEqual(latest_entry.author_email(), "pkasting@google.com")
+        self.assertEqual(latest_entry.reviewer_text(), u"Tor Arne Vestb\xf8")
+        self.assertEqual(latest_entry.touched_files(), ["DumpRenderTree/win/DumpRenderTree.vcproj", "DumpRenderTree/win/ImageDiff.vcproj", "DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj"])
 
         self.assertTrue(latest_entry.reviewer())  # Make sure that our UTF8-based lookup of Tor works.
 
@@ -470,8 +470,8 @@ class ChangeLogTest(unittest.TestCase):
         changelog_contents = u"%s\n%s" % (self._example_entry, self._rolled_over_footer)
         changelog_file = StringIO(changelog_contents)
         latest_entry = ChangeLog.parse_latest_entry_from_file(changelog_file)
-        self.assertEquals(latest_entry.contents(), self._example_entry)
-        self.assertEquals(latest_entry.author_name(), "Peter Kasting")
+        self.assertEqual(latest_entry.contents(), self._example_entry)
+        self.assertEqual(latest_entry.author_name(), "Peter Kasting")
 
     @staticmethod
     def _write_tmp_file_with_contents(byte_array):
@@ -543,14 +543,14 @@ class ChangeLogTest(unittest.TestCase):
         actual_contents = self._read_file_contents(changelog_path, "utf-8")
         expected_contents = changelog_contents.replace('NOBODY (OOPS!)', reviewer_name)
         os.remove(changelog_path)
-        self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
+        self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
 
         changelog_contents_without_reviewer_line = u"%s\n%s" % (self._new_entry_boilerplate_without_reviewer_line, self._example_changelog)
         changelog_path = self._write_tmp_file_with_contents(changelog_contents_without_reviewer_line.encode("utf-8"))
         ChangeLog(changelog_path).set_reviewer(reviewer_name)
         actual_contents = self._read_file_contents(changelog_path, "utf-8")
         os.remove(changelog_path)
-        self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
+        self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
 
         changelog_contents_without_reviewer_line = u"%s\n%s" % (self._new_entry_boilerplate_without_reviewer_multiple_bugurl, self._example_changelog)
         changelog_path = self._write_tmp_file_with_contents(changelog_contents_without_reviewer_line.encode("utf-8"))
@@ -559,7 +559,7 @@ class ChangeLogTest(unittest.TestCase):
         changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_multiple_bugurl, self._example_changelog)
         expected_contents = changelog_contents.replace('NOBODY (OOPS!)', reviewer_name)
         os.remove(changelog_path)
-        self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
+        self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
 
     def test_set_short_description_and_bug_url(self):
         changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_bugurl, self._example_changelog)
@@ -571,7 +571,7 @@ class ChangeLogTest(unittest.TestCase):
         expected_message = "%s\n        %s" % (short_description, bug_url)
         expected_contents = changelog_contents.replace("Need a short description (OOPS!).", expected_message)
         os.remove(changelog_path)
-        self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
+        self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
 
         changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
         changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
@@ -582,4 +582,4 @@ class ChangeLogTest(unittest.TestCase):
         expected_message = "%s\n        %s" % (short_description, bug_url)
         expected_contents = changelog_contents.replace("Need a short description (OOPS!).\n        Need the bug URL (OOPS!).", expected_message)
         os.remove(changelog_path)
-        self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
+        self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
index d61a098..cba0f24 100644 (file)
@@ -36,44 +36,44 @@ class DiffParserTest(unittest.TestCase):
     def test_diff_parser(self, parser = None):
         if not parser:
             parser = diff_parser.DiffParser(DIFF_TEST_DATA.splitlines())
-        self.assertEquals(3, len(parser.files))
+        self.assertEqual(3, len(parser.files))
 
         self.assertTrue('WebCore/rendering/style/StyleFlexibleBoxData.h' in parser.files)
         diff = parser.files['WebCore/rendering/style/StyleFlexibleBoxData.h']
-        self.assertEquals(7, len(diff.lines))
+        self.assertEqual(7, len(diff.lines))
         # The first two unchaged lines.
-        self.assertEquals((47, 47), diff.lines[0][0:2])
-        self.assertEquals('', diff.lines[0][2])
-        self.assertEquals((48, 48), diff.lines[1][0:2])
-        self.assertEquals('    unsigned align : 3; // EBoxAlignment', diff.lines[1][2])
+        self.assertEqual((47, 47), diff.lines[0][0:2])
+        self.assertEqual('', diff.lines[0][2])
+        self.assertEqual((48, 48), diff.lines[1][0:2])
+        self.assertEqual('    unsigned align : 3; // EBoxAlignment', diff.lines[1][2])
         # The deleted line
-        self.assertEquals((50, 0), diff.lines[3][0:2])
-        self.assertEquals('    unsigned orient: 1; // EBoxOrient', diff.lines[3][2])
+        self.assertEqual((50, 0), diff.lines[3][0:2])
+        self.assertEqual('    unsigned orient: 1; // EBoxOrient', diff.lines[3][2])
 
         # The first file looks OK. Let's check the next, more complicated file.
         self.assertTrue('WebCore/rendering/style/StyleRareInheritedData.cpp' in parser.files)
         diff = parser.files['WebCore/rendering/style/StyleRareInheritedData.cpp']
         # There are 3 chunks.
-        self.assertEquals(7 + 7 + 9, len(diff.lines))
+        self.assertEqual(7 + 7 + 9, len(diff.lines))
         # Around an added line.
-        self.assertEquals((60, 61), diff.lines[9][0:2])
-        self.assertEquals((0, 62), diff.lines[10][0:2])
-        self.assertEquals((61, 63), diff.lines[11][0:2])
+        self.assertEqual((60, 61), diff.lines[9][0:2])
+        self.assertEqual((0, 62), diff.lines[10][0:2])
+        self.assertEqual((61, 63), diff.lines[11][0:2])
         # Look through the last chunk, which contains both add's and delete's.
-        self.assertEquals((81, 83), diff.lines[14][0:2])
-        self.assertEquals((82, 84), diff.lines[15][0:2])
-        self.assertEquals((83, 85), diff.lines[16][0:2])
-        self.assertEquals((84, 0), diff.lines[17][0:2])
-        self.assertEquals((0, 86), diff.lines[18][0:2])
-        self.assertEquals((0, 87), diff.lines[19][0:2])
-        self.assertEquals((85, 88), diff.lines[20][0:2])
-        self.assertEquals((86, 89), diff.lines[21][0:2])
-        self.assertEquals((87, 90), diff.lines[22][0:2])
+        self.assertEqual((81, 83), diff.lines[14][0:2])
+        self.assertEqual((82, 84), diff.lines[15][0:2])
+        self.assertEqual((83, 85), diff.lines[16][0:2])
+        self.assertEqual((84, 0), diff.lines[17][0:2])
+        self.assertEqual((0, 86), diff.lines[18][0:2])
+        self.assertEqual((0, 87), diff.lines[19][0:2])
+        self.assertEqual((85, 88), diff.lines[20][0:2])
+        self.assertEqual((86, 89), diff.lines[21][0:2])
+        self.assertEqual((87, 90), diff.lines[22][0:2])
 
         # Check if a newly added file is correctly handled.
         diff = parser.files['LayoutTests/platform/mac/fast/flexbox/box-orient-button-expected.checksum']
-        self.assertEquals(1, len(diff.lines))
-        self.assertEquals((0, 1), diff.lines[0][0:2])
+        self.assertEqual(1, len(diff.lines))
+        self.assertEqual((0, 1), diff.lines[0][0:2])
 
     def test_git_mnemonicprefix(self):
         p = re.compile(r' ([a|b])/')
index 802fe2c..cff254e 100644 (file)
@@ -615,12 +615,12 @@ class SVNTest(SCMTest):
         self._setup_webkittools_scripts_symlink(self.scm)
         self.checkout.apply_patch(self._create_patch(one_line_overlap_patch))
         expected_changelog_contents = "%s\n%s" % (self._set_date_and_reviewer(one_line_overlap_entry), changelog_contents)
-        self.assertEquals(read_from_path('ChangeLog'), expected_changelog_contents)
+        self.assertEqual(read_from_path('ChangeLog'), expected_changelog_contents)
 
         self.scm.revert_files(['ChangeLog'])
         self.checkout.apply_patch(self._create_patch(two_line_overlap_patch))
         expected_changelog_contents = "%s\n%s" % (self._set_date_and_reviewer(two_line_overlap_entry), changelog_contents)
-        self.assertEquals(read_from_path('ChangeLog'), expected_changelog_contents)
+        self.assertEqual(read_from_path('ChangeLog'), expected_changelog_contents)
 
     def setUp(self):
         SVNTestRepository.setup(self)
@@ -1192,7 +1192,7 @@ class GitSVNTest(SCMTest):
 
     def test_revisions_changing_files_with_local_commit(self):
         self._one_local_commit()
-        self.assertEquals(self.scm.revisions_changing_file('test_file_commit1'), [])
+        self.assertEqual(self.scm.revisions_changing_file('test_file_commit1'), [])
 
     def test_commit_with_message(self):
         self._one_local_commit_plus_working_copy_changes()
@@ -1302,7 +1302,7 @@ class GitSVNTest(SCMTest):
     def test_upstream_branch(self):
         run_command(['git', 'checkout', '-t', '-b', 'my-branch'])
         run_command(['git', 'checkout', '-t', '-b', 'my-second-branch'])
-        self.assertEquals(self.scm._upstream_branch(), 'my-branch')
+        self.assertEqual(self.scm._upstream_branch(), 'my-branch')
 
     def test_remote_branch_ref(self):
         self.assertEqual(self.scm.remote_branch_ref(), 'refs/remotes/trunk')
@@ -1353,7 +1353,7 @@ class GitSVNTest(SCMTest):
         os.remove('test_file_commit1')
         patch = scm.create_patch()
         patch_with_changed_files = scm.create_patch(changed_files=['test_file_commit1', 'test_file_commit2'])
-        self.assertEquals(patch, patch_with_changed_files)
+        self.assertEqual(patch, patch_with_changed_files)
 
     def test_create_patch_git_commit(self):
         self._two_local_commits()
@@ -1597,7 +1597,7 @@ class GitTestWithMock(unittest.TestCase):
         OutputCapture().assert_outputs(self, scm.create_patch, expected_stderr=expected_stderr)
 
     def test_push_local_commits_to_server_with_username_and_password(self):
-        self.assertEquals(self.make_scm().push_local_commits_to_server(username='dbates@webkit.org', password='blah'), "MOCK output of child process")
+        self.assertEqual(self.make_scm().push_local_commits_to_server(username='dbates@webkit.org', password='blah'), "MOCK output of child process")
 
     def test_push_local_commits_to_server_without_username_and_password(self):
         self.assertRaises(AuthenticationError, self.make_scm().push_local_commits_to_server)
index 2720523..58d58d4 100644 (file)
@@ -34,42 +34,42 @@ from webkitpy.common.config.ports import *
 
 class DeprecatedPortTest(unittest.TestCase):
     def test_mac_port(self):
-        self.assertEquals(MacPort().flag(), "--port=mac")
-        self.assertEquals(MacPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests"))
-        self.assertEquals(MacPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit"))
-        self.assertEquals(MacPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug"])
-        self.assertEquals(MacPort().build_webkit_command(build_style="release"), DeprecatedPort().script_shell_command("build-webkit") + ["--release"])
+        self.assertEqual(MacPort().flag(), "--port=mac")
+        self.assertEqual(MacPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests"))
+        self.assertEqual(MacPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit"))
+        self.assertEqual(MacPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug"])
+        self.assertEqual(MacPort().build_webkit_command(build_style="release"), DeprecatedPort().script_shell_command("build-webkit") + ["--release"])
 
     def test_gtk_port(self):
-        self.assertEquals(GtkPort().flag(), "--port=gtk")
-        self.assertEquals(GtkPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests") + ["--gtk"])
-        self.assertEquals(GtkPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--gtk", "--update-gtk", DeprecatedPort().makeArgs()])
-        self.assertEquals(GtkPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--gtk", "--update-gtk", DeprecatedPort().makeArgs()])
+        self.assertEqual(GtkPort().flag(), "--port=gtk")
+        self.assertEqual(GtkPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests") + ["--gtk"])
+        self.assertEqual(GtkPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--gtk", "--update-gtk", DeprecatedPort().makeArgs()])
+        self.assertEqual(GtkPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--gtk", "--update-gtk", DeprecatedPort().makeArgs()])
 
     def test_efl_port(self):
-        self.assertEquals(EflPort().flag(), "--port=efl")
-        self.assertEquals(EflPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--efl", "--update-efl", DeprecatedPort().makeArgs()])
-        self.assertEquals(EflPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--efl", "--update-efl", DeprecatedPort().makeArgs()])
+        self.assertEqual(EflPort().flag(), "--port=efl")
+        self.assertEqual(EflPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--efl", "--update-efl", DeprecatedPort().makeArgs()])
+        self.assertEqual(EflPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--efl", "--update-efl", DeprecatedPort().makeArgs()])
 
     def test_qt_port(self):
-        self.assertEquals(QtPort().flag(), "--port=qt")
-        self.assertEquals(QtPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests"))
-        self.assertEquals(QtPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--qt", DeprecatedPort().makeArgs()])
-        self.assertEquals(QtPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--qt", DeprecatedPort().makeArgs()])
+        self.assertEqual(QtPort().flag(), "--port=qt")
+        self.assertEqual(QtPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests"))
+        self.assertEqual(QtPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--qt", DeprecatedPort().makeArgs()])
+        self.assertEqual(QtPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--qt", DeprecatedPort().makeArgs()])
 
     def test_chromium_port(self):
-        self.assertEquals(ChromiumPort().flag(), "--port=chromium")
-        self.assertEquals(ChromiumPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("new-run-webkit-tests") + ["--chromium", "--skip-failing-tests"])
-        self.assertEquals(ChromiumPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--chromium", "--update-chromium"])
-        self.assertEquals(ChromiumPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--chromium", "--update-chromium"])
-        self.assertEquals(ChromiumPort().update_webkit_command(), DeprecatedPort().script_shell_command("update-webkit") + ["--chromium"])
+        self.assertEqual(ChromiumPort().flag(), "--port=chromium")
+        self.assertEqual(ChromiumPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("new-run-webkit-tests") + ["--chromium", "--skip-failing-tests"])
+        self.assertEqual(ChromiumPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--chromium", "--update-chromium"])
+        self.assertEqual(ChromiumPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--chromium", "--update-chromium"])
+        self.assertEqual(ChromiumPort().update_webkit_command(), DeprecatedPort().script_shell_command("update-webkit") + ["--chromium"])
 
     def test_chromium_android_port(self):
-        self.assertEquals(ChromiumAndroidPort().build_webkit_command(), ChromiumPort().build_webkit_command() + ["--chromium-android"])
-        self.assertEquals(ChromiumAndroidPort().update_webkit_command(), ChromiumPort().update_webkit_command() + ["--chromium-android"])
+        self.assertEqual(ChromiumAndroidPort().build_webkit_command(), ChromiumPort().build_webkit_command() + ["--chromium-android"])
+        self.assertEqual(ChromiumAndroidPort().update_webkit_command(), ChromiumPort().update_webkit_command() + ["--chromium-android"])
 
     def test_chromium_xvfb_port(self):
-        self.assertEquals(ChromiumXVFBPort().run_webkit_tests_command(), ['xvfb-run'] + DeprecatedPort().script_shell_command('new-run-webkit-tests') + ['--chromium', '--skip-failing-tests'])
+        self.assertEqual(ChromiumXVFBPort().run_webkit_tests_command(), ['xvfb-run'] + DeprecatedPort().script_shell_command('new-run-webkit-tests') + ['--chromium', '--skip-failing-tests'])
 
 
 if __name__ == '__main__':
index 2b94b86..b4bf897 100644 (file)
@@ -34,28 +34,28 @@ from .urls import parse_bug_id, parse_attachment_id
 class URLsTest(unittest.TestCase):
     def test_parse_bug_id(self):
         # FIXME: These would be all better as doctests
-        self.assertEquals(12345, parse_bug_id("http://webkit.org/b/12345"))
-        self.assertEquals(12345, parse_bug_id("foo\n\nhttp://webkit.org/b/12345\nbar\n\n"))
-        self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345"))
-        self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345&ctype=xml"))
-        self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345&ctype=xml&excludefield=attachmentdata"))
-        self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345excludefield=attachmentdata&ctype=xml"))
+        self.assertEqual(12345, parse_bug_id("http://webkit.org/b/12345"))
+        self.assertEqual(12345, parse_bug_id("foo\n\nhttp://webkit.org/b/12345\nbar\n\n"))
+        self.assertEqual(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345"))
+        self.assertEqual(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345&ctype=xml"))
+        self.assertEqual(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345&ctype=xml&excludefield=attachmentdata"))
+        self.assertEqual(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345excludefield=attachmentdata&ctype=xml"))
 
         # Our url parser is super-fragile, but at least we're testing it.
-        self.assertEquals(None, parse_bug_id("http://www.webkit.org/b/12345"))
-        self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345"))
-        self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345&excludefield=attachmentdata"))
-        self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id=12345"))
-        self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&ctype=xml&id=12345"))
-        self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&id=12345&ctype=xml"))
+        self.assertEqual(None, parse_bug_id("http://www.webkit.org/b/12345"))
+        self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345"))
+        self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345&excludefield=attachmentdata"))
+        self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id=12345"))
+        self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&ctype=xml&id=12345"))
+        self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&id=12345&ctype=xml"))
 
     def test_parse_attachment_id(self):
-        self.assertEquals(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=review"))
-        self.assertEquals(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=edit"))
-        self.assertEquals(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=prettypatch"))
-        self.assertEquals(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=diff"))
+        self.assertEqual(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=review"))
+        self.assertEqual(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=edit"))
+        self.assertEqual(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=prettypatch"))
+        self.assertEqual(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=diff"))
 
         # Direct attachment links are hosted from per-bug subdomains:
-        self.assertEquals(12345, parse_attachment_id("https://bug-23456-attachments.webkit.org/attachment.cgi?id=12345"))
+        self.assertEqual(12345, parse_attachment_id("https://bug-23456-attachments.webkit.org/attachment.cgi?id=12345"))
         # Make sure secure attachment URLs work too.
-        self.assertEquals(12345, parse_attachment_id("https://bug-23456-attachments.webkit.org/attachment.cgi?id=12345&t=Bqnsdkl9fs"))
+        self.assertEqual(12345, parse_attachment_id("https://bug-23456-attachments.webkit.org/attachment.cgi?id=12345&t=Bqnsdkl9fs"))
index 75beaf0..641251f 100644 (file)
@@ -43,7 +43,7 @@ class MockWinFileSystem(object):
 
 class TestWinNormalize(unittest.TestCase):
     def assert_filesystem_normalizes(self, filesystem):
-        self.assertEquals(find_files._normalize(filesystem, "c:\\foo",
+        self.assertEqual(find_files._normalize(filesystem, "c:\\foo",
             ['fast/html', 'fast/canvas/*', 'compositing/foo.html']),
             ['c:\\foo\\fast\html', 'c:\\foo\\fast\canvas\*', 'c:\\foo\compositing\\foo.html'])
 
index 6108b5e..538d39e 100644 (file)
@@ -85,16 +85,16 @@ class BugzillaTest(unittest.TestCase):
     def test_url_creation(self):
         # FIXME: These would be all better as doctests
         bugs = Bugzilla()
-        self.assertEquals(None, bugs.bug_url_for_bug_id(None))
-        self.assertEquals(None, bugs.short_bug_url_for_bug_id(None))
-        self.assertEquals(None, bugs.attachment_url_for_id(None))
+        self.assertEqual(None, bugs.bug_url_for_bug_id(None))
+        self.assertEqual(None, bugs.short_bug_url_for_bug_id(None))
+        self.assertEqual(None, bugs.attachment_url_for_id(None))
 
     def test_parse_bug_id(self):
         # Test that we can parse the urls we produce.
         bugs = Bugzilla()
-        self.assertEquals(12345, urls.parse_bug_id(bugs.short_bug_url_for_bug_id(12345)))
-        self.assertEquals(12345, urls.parse_bug_id(bugs.bug_url_for_bug_id(12345)))
-        self.assertEquals(12345, urls.parse_bug_id(bugs.bug_url_for_bug_id(12345, xml=True)))
+        self.assertEqual(12345, urls.parse_bug_id(bugs.short_bug_url_for_bug_id(12345)))
+        self.assertEqual(12345, urls.parse_bug_id(bugs.bug_url_for_bug_id(12345)))
+        self.assertEqual(12345, urls.parse_bug_id(bugs.bug_url_for_bug_id(12345, xml=True)))
 
     _bug_xml = """
     <bug>
@@ -198,10 +198,10 @@ Ignore this bug.  Just for testing failure modes of webkit-patch and the commit-
     # FIXME: This should move to a central location and be shared by more unit tests.
     def _assert_dictionaries_equal(self, actual, expected):
         # Make sure we aren't parsing more or less than we expect
-        self.assertEquals(sorted(actual.keys()), sorted(expected.keys()))
+        self.assertEqual(sorted(actual.keys()), sorted(expected.keys()))
 
         for key, expected_value in expected.items():
-            self.assertEquals(actual[key], expected_value, ("Failure for key: %s: Actual='%s' Expected='%s'" % (key, actual[key], expected_value)))
+            self.assertEqual(actual[key], expected_value, ("Failure for key: %s: Actual='%s' Expected='%s'" % (key, actual[key], expected_value)))
 
     def test_parse_bug_dictionary_from_xml(self):
         bug = Bugzilla()._parse_bug_dictionary_from_xml(self._single_bug_xml)
@@ -217,10 +217,10 @@ Ignore this bug.  Just for testing failure modes of webkit-patch and the commit-
     def test_parse_bugs_from_xml(self):
         bugzilla = Bugzilla()
         bugs = bugzilla._parse_bugs_from_xml(self._sample_multi_bug_xml)
-        self.assertEquals(len(bugs), 2)
-        self.assertEquals(bugs[0].id(), self._expected_example_bug_parsing['id'])
+        self.assertEqual(len(bugs), 2)
+        self.assertEqual(bugs[0].id(), self._expected_example_bug_parsing['id'])
         bugs = bugzilla._parse_bugs_from_xml("")
-        self.assertEquals(len(bugs), 0)
+        self.assertEqual(len(bugs), 0)
 
     # This could be combined into test_bug_parsing later if desired.
     def test_attachment_parsing(self):
@@ -244,7 +244,7 @@ Ignore this bug.  Just for testing failure modes of webkit-patch and the commit-
 
     def test_attachment_detail_bug_parsing(self):
         bugzilla = Bugzilla()
-        self.assertEquals(27314, bugzilla._parse_bug_id_from_attachment_page(self._sample_attachment_detail_page))
+        self.assertEqual(27314, bugzilla._parse_bug_id_from_attachment_page(self._sample_attachment_detail_page))
 
     def test_add_cc_to_bug(self):
         bugzilla = Bugzilla()
@@ -408,7 +408,7 @@ class BugzillaQueriesTest(unittest.TestCase):
 """
 
     def _assert_result_count(self, queries, html, count):
-        self.assertEquals(queries._parse_result_count(html), count)
+        self.assertEqual(queries._parse_result_count(html), count)
 
     def test_parse_result_count(self):
         queries = BugzillaQueries(None)
@@ -420,12 +420,12 @@ class BugzillaQueriesTest(unittest.TestCase):
 
     def test_request_page_parsing(self):
         queries = BugzillaQueries(None)
-        self.assertEquals([40511, 40722, 40723], queries._parse_attachment_ids_request_query(self._sample_request_page))
+        self.assertEqual([40511, 40722, 40723], queries._parse_attachment_ids_request_query(self._sample_request_page))
 
     def test_quip_page_parsing(self):
         queries = BugzillaQueries(None)
         expected_quips = ["Everything should be made as simple as possible, but not simpler. - Albert Einstein", "Good artists copy. Great artists steal. - Pablo Picasso", u"\u00e7gua mole em pedra dura, tanto bate at\u008e que fura."]
-        self.assertEquals(expected_quips, queries._parse_quips(self._sample_quip_page))
+        self.assertEqual(expected_quips, queries._parse_quips(self._sample_quip_page))
 
     def test_load_query(self):
         queries = BugzillaQueries(Mock())
@@ -482,7 +482,7 @@ class EditUsersParserTest(unittest.TestCase):
     def _assert_login_userid_pairs(self, results_page, expected_logins):
         parser = EditUsersParser()
         logins = parser.login_userid_pairs_from_edit_user_results(results_page)
-        self.assertEquals(logins, expected_logins)
+        self.assertEqual(logins, expected_logins)
 
     def test_logins_from_editusers_results(self):
         self._assert_login_userid_pairs(self._example_user_results, [("abarth@webkit.org", 1234)])
index 69f8648..547a8e6 100644 (file)
@@ -232,10 +232,10 @@ class BuildBotTest(unittest.TestCase):
             builder = buildbot._parse_builder_status_from_row(status_row)
 
             # Make sure we aren't parsing more or less than we expect
-            self.assertEquals(builder.keys(), expected_parsing.keys())
+            self.assertEqual(builder.keys(), expected_parsing.keys())
 
             for key, expected_value in expected_parsing.items():
-                self.assertEquals(builder[key], expected_value, ("Builder %d parse failure for key: %s: Actual='%s' Expected='%s'" % (x, key, builder[key], expected_value)))
+                self.assertEqual(builder[key], expected_value, ("Builder %d parse failure for key: %s: Actual='%s' Expected='%s'" % (x, key, builder[key], expected_value)))
 
     def test_builder_with_name(self):
         buildbot = BuildBot()
@@ -464,7 +464,7 @@ class BuildBotTest(unittest.TestCase):
         b = Builder('builder', BuildBot())
         b._fetch_build = self._fetch_build
         b._fetch_revision_to_build_map = self._fetch_revision_to_build_map
-        self.assertEquals("correct build", b.latest_cached_build())
+        self.assertEqual("correct build", b.latest_cached_build())
 
     def results_url(self):
         return "some-url"
@@ -472,7 +472,7 @@ class BuildBotTest(unittest.TestCase):
     def test_results_zip_url(self):
         b = Build(None, 123, 123, False)
         b.results_url = self.results_url
-        self.assertEquals("some-url.zip", b.results_zip_url())
+        self.assertEqual("some-url.zip", b.results_zip_url())
 
 
 if __name__ == '__main__':
index a797e3d..15682f3 100644 (file)
@@ -135,8 +135,8 @@ password: "SECRETSAUCE"
         os.environ['WEBKIT_BUGZILLA_USERNAME'] = "foo"
         os.environ['WEBKIT_BUGZILLA_PASSWORD'] = "bar"
         username, password = credentials._credentials_from_environment()
-        self.assertEquals(username, "foo")
-        self.assertEquals(password, "bar")
+        self.assertEqual(username, "foo")
+        self.assertEqual(password, "bar")
         os.environ = saved_environ
 
     def test_read_credentials_without_git_repo(self):
index 9a66d9e..bd41032 100644 (file)
@@ -54,27 +54,27 @@ class FailureMapTest(unittest.TestCase):
 
     def test_failing_revisions(self):
         failure_map = self._make_failure_map()
-        self.assertEquals(failure_map.failing_revisions(), [1234, 1235])
+        self.assertEqual(failure_map.failing_revisions(), [1234, 1235])
 
     def test_new_failures(self):
         failure_map = self._make_failure_map()
         failure_map.filter_out_old_failures(lambda revision: False)
-        self.assertEquals(failure_map.failing_revisions(), [1234, 1235])
+        self.assertEqual(failure_map.failing_revisions(), [1234, 1235])
 
     def test_new_failures_with_old_revisions(self):
         failure_map = self._make_failure_map()
         failure_map.filter_out_old_failures(lambda revision: revision == 1234)
-        self.assertEquals(failure_map.failing_revisions(), [])
+        self.assertEqual(failure_map.failing_revisions(), [])
 
     def test_new_failures_with_more_old_revisions(self):
         failure_map = self._make_failure_map()
         failure_map.filter_out_old_failures(lambda revision: revision == 1235)
-        self.assertEquals(failure_map.failing_revisions(), [1234])
+        self.assertEqual(failure_map.failing_revisions(), [1234])
 
     def test_tests_failing_for(self):
         failure_map = self._make_failure_map()
-        self.assertEquals(failure_map.tests_failing_for(1234), [u'test1'])
+        self.assertEqual(failure_map.tests_failing_for(1234), [u'test1'])
 
     def test_failing_tests(self):
         failure_map = self._make_failure_map()
-        self.assertEquals(failure_map.failing_tests(), set([u'test1']))
+        self.assertEqual(failure_map.failing_tests(), set([u'test1']))
index 939a56a..462a88c 100644 (file)
@@ -130,9 +130,9 @@ class LayoutTestResultsTest(unittest.TestCase):
 
     def test_set_failure_limit_count(self):
         results = LayoutTestResults([])
-        self.assertEquals(results.failure_limit_count(), None)
+        self.assertEqual(results.failure_limit_count(), None)
         results.set_failure_limit_count(10)
-        self.assertEquals(results.failure_limit_count(), 10)
+        self.assertEqual(results.failure_limit_count(), 10)
 
     def test_results_from_string(self):
         self.assertEqual(LayoutTestResults.results_from_string(None), None)
index f885206..40e8023 100644 (file)
@@ -34,10 +34,10 @@ from unittestresults import UnitTestResults
 class UnitTestResultsTest(unittest.TestCase):
 
     def test_nostring(self):
-        self.assertEquals(None, UnitTestResults.results_from_string(None))
+        self.assertEqual(None, UnitTestResults.results_from_string(None))
 
     def test_emptystring(self):
-        self.assertEquals(None, UnitTestResults.results_from_string(""))
+        self.assertEqual(None, UnitTestResults.results_from_string(""))
 
     def test_nofailures(self):
         no_failures_xml = """<?xml version="1.0" encoding="UTF-8"?>
@@ -48,7 +48,7 @@ class UnitTestResultsTest(unittest.TestCase):
     <testcase name="CrashIfSettingUnsetRowIndex" status="run" time="0.123" classname="RenderTableCellDeathTest" />
   </testsuite>
 </testsuites>"""
-        self.assertEquals([], UnitTestResults.results_from_string(no_failures_xml))
+        self.assertEqual([], UnitTestResults.results_from_string(no_failures_xml))
 
     def test_onefailure(self):
         one_failure_xml = """<?xml version="1.0" encoding="UTF-8"?>
@@ -66,7 +66,7 @@ Expected: 1]]></failure>
   </testsuite>
 </testsuites>"""
         expected = ["WebFrameTest.FAILS_DivAutoZoomParamsTest"]
-        self.assertEquals(expected, UnitTestResults.results_from_string(one_failure_xml))
+        self.assertEqual(expected, UnitTestResults.results_from_string(one_failure_xml))
 
     def test_multiple_failures_per_test(self):
         multiple_failures_per_test_xml = """<?xml version="1.0" encoding="UTF-8"?>
@@ -91,7 +91,7 @@ Expected: 6.28]]></failure>
   </testsuite>
 </testsuites>"""
         expected = ["ClassOne.TestOne", "ClassTwo.TestTwo"]
-        self.assertEquals(expected, UnitTestResults.results_from_string(multiple_failures_per_test_xml))
+        self.assertEqual(expected, UnitTestResults.results_from_string(multiple_failures_per_test_xml))
 
 
 if __name__ == '__main__':
index defbbf8..a56bec2 100644 (file)
@@ -32,12 +32,12 @@ class ReadChecksumFromPngTest(unittest.TestCase):
         # Test a file with the comment.
         filehandle = StringIO.StringIO('''\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03 \x00\x00\x02X\x08\x02\x00\x00\x00\x15\x14\x15'\x00\x00\x00)tEXtchecksum\x003c4134fe2739880353f91c5b84cadbaaC\xb8?\xec\x00\x00\x16\xfeIDATx\x9c\xed\xdd[\x8cU\xe5\xc1\xff\xf15T\x18\x0ea,)\xa6\x80XZ<\x10\n\xd6H\xc4V\x88}\xb5\xa9\xd6r\xd5\x0bki0\xa6\xb5ih\xd2\xde\x98PHz\xd1\x02=\\q#\x01\x8b\xa5rJ\x8b\x88i\xacM\xc5h\x8cbMk(\x1ez@!\x0c\xd5\xd2\xc2\xb44\x1c\x848\x1dF(\xeb\x7f\xb1\xff\xd9\xef~g\xd6\xde3\xe0o\x10\xec\xe7sa6{\xd6z\xd6\xb3\xd7\xf3\xa8_7\xdbM[Y\x96\x05\x00\x009\xc3\xde\xeb\t\x00\x00\xbc\xdf\x08,\x00\x800\x81\x05\x00\x10&\xb0\x00\x00\xc2\x04\x16\x00@\x98\xc0\x02\x00\x08\x13X\x00\x00a\x02\x0b\x00 L\1cx01\x00\x84\t,\x00\x800\x81\x05\x00\x10\xd64\xb0\xda\x9a\xdb\xb6m\xdb\xb4i\xd3\xfa\x9fr\xf3\xcd7\x0f\xe5T\x07\xe5\xd4\xa9''')
         checksum = read_checksum_from_png.read_checksum(filehandle)
-        self.assertEquals('3c4134fe2739880353f91c5b84cadbaa', checksum)
+        self.assertEqual('3c4134fe2739880353f91c5b84cadbaa', checksum)
 
         # Test a file without the comment.
         filehandle = StringIO.StringIO('''\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03 \x00\x00\x02X\x08\x02\x00\x00\x00\x15\x14\x15'\x00\x00\x16\xfeIDATx\x9c\xed\xdd[\x8cU\xe5\xc1\xff\xf15T\x18\x0ea,)\xa6\x80XZ<\x10\n\xd6H\xc4V\x88}\xb5\xa9\xd6r\xd5\x0bki0\xa6\xb5ih\xd2\xde\x98PHz\xd1\x02=\\q#\x01\x8b\xa5rJ\x8b\x88i\xacM\xc5h\x8cbMk(\x1ez@!\x0c\xd5\xd2\xc2\xb44\x1c\x848\x1dF(\xeb\x7f\xb1\xff\xd9\xef~g\xd6\xde3\xe0o\x10\xec\xe7sa6{\xd6z\xd6\xb3\xd7\xf3\xa8_7\xdbM[Y\x96\x05\x00\x009\xc3\xde\xeb\t\x00\x00\xbc\xdf\x08,\x00\x800\x81\x05\x00\x10&\xb0\x00\x00\xc2\x04\x16\x00@\x98\xc0\x02\x00\x08\x13X\x00\x00a\x02\x0b\x00 L\1cx01\x00\x84\t,\x00\x800\x81\x05\x00\x10\xd64\xb0\xda\x9a\xdb\xb6m\xdb\xb4i\xd3\xfa\x9fr\xf3\xcd7\x0f\xe5T\x07\xe5\xd4\xa9S\x8b\x17/\x1e?~\xfc\xf8\xf1\xe3\xef\xbf\xff\xfe\xf7z:M5\xbb\x87\x17\xcbUZ\x8f|V\xd7\xbd\x10\xb6\xcd{b\x88\xf6j\xb3\x9b?\x14\x9b\xa1>\xe6\xf9\xd9\xcf\x00\x17\x93''')
         checksum = read_checksum_from_png.read_checksum(filehandle)
-        self.assertEquals(None, checksum)
+        self.assertEqual(None, checksum)
 
 
 if __name__ == '__main__':
index 3778162..b986609 100644 (file)
@@ -47,7 +47,7 @@ class LoggingTest(unittest.TestCase):
         finally:
             sys.stderr = original_stderr
 
-        self.assertEquals(actual_output, expected_output, "log(\"%s\") expected: %s actual: %s" % (log_input, expected_output, actual_output))
+        self.assertEqual(actual_output, expected_output, "log(\"%s\") expected: %s actual: %s" % (log_input, expected_output, actual_output))
 
     def test_log(self):
         self.assert_log_equals("test", "test\n")
index 57c5573..755955d 100644 (file)
@@ -48,19 +48,19 @@ from webkitpy.common.system.filesystem_mock import MockFileSystem
 class ScriptErrorTest(unittest.TestCase):
     def test_string_from_args(self):
         error = ScriptError()
-        self.assertEquals(error._string_from_args(None), 'None')
-        self.assertEquals(error._string_from_args([]), '[]')
-        self.assertEquals(error._string_from_args(map(str, range(30))), "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'...")
+        self.assertEqual(error._string_from_args(None), 'None')
+        self.assertEqual(error._string_from_args([]), '[]')
+        self.assertEqual(error._string_from_args(map(str, range(30))), "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'...")
 
     def test_message_with_output(self):
         error = ScriptError('My custom message!', '', -1)
-        self.assertEquals(error.message_with_output(), 'My custom message!')
+        self.assertEqual(error.message_with_output(), 'My custom message!')
         error = ScriptError('My custom message!', '', -1, 'My output.')
-        self.assertEquals(error.message_with_output(), 'My custom message!\n\nMy output.')
+        self.assertEqual(error.message_with_output(), 'My custom message!\n\nMy output.')
         error = ScriptError('', 'my_command!', -1, 'My output.', '/Users/username/blah')
-        self.assertEquals(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1 cwd: /Users/username/blah\n\nMy output.')
+        self.assertEqual(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1 cwd: /Users/username/blah\n\nMy output.')
         error = ScriptError('', 'my_command!', -1, 'ab' + '1' * 499)
-        self.assertEquals(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1\n\nLast 500 characters of output:\nb' + '1' * 499)
+        self.assertEqual(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1\n\nLast 500 characters of output:\nb' + '1' * 499)
 
 def never_ending_command():
     """Arguments for a command that will never end (useful for testing process
@@ -104,7 +104,7 @@ class ExecutiveTest(unittest.TestCase):
     def test_run_command_with_bad_command(self):
         def run_bad_command():
             Executive().run_command(["foo_bar_command_blah"], error_handler=Executive.ignore_error, return_exit_code=True)
-        self.failUnlessRaises(OSError, run_bad_command)
+        self.assertRaises(OSError, run_bad_command)
 
     def test_run_command_args_type(self):
         executive = Executive()
@@ -133,24 +133,24 @@ class ExecutiveTest(unittest.TestCase):
         executive = Executive()
 
         output = executive.run_command(command_line('cat'), input=unicode_tor_input)
-        self.assertEquals(output, unicode_tor_output)
+        self.assertEqual(output, unicode_tor_output)
 
         output = executive.run_command(command_line('echo', unicode_tor_input))
-        self.assertEquals(output, unicode_tor_output)
+        self.assertEqual(output, unicode_tor_output)
 
         output = executive.run_command(command_line('echo', unicode_tor_input), decode_output=False)
-        self.assertEquals(output, encoded_tor)
+        self.assertEqual(output, encoded_tor)
 
         # Make sure that str() input also works.
         output = executive.run_command(command_line('cat'), input=encoded_tor, decode_output=False)
-        self.assertEquals(output, encoded_tor)
+        self.assertEqual(output, encoded_tor)
 
         # FIXME: We should only have one run* method to test
         output = executive.run_and_throw_if_fail(command_line('echo', unicode_tor_input), quiet=True)
-        self.assertEquals(output, unicode_tor_output)
+        self.assertEqual(output, unicode_tor_output)
 
         output = executive.run_and_throw_if_fail(command_line('echo', unicode_tor_input), quiet=True, decode_output=False)
-        self.assertEquals(output, encoded_tor)
+        self.assertEqual(output, encoded_tor)
 
     def serial_test_kill_process(self):
         executive = Executive()
@@ -236,8 +236,8 @@ class ExecutiveTest(unittest.TestCase):
         command_outputs = Executive().run_in_parallel(commands, processes=NUM_PROCESSES)
         done = time.time()
         self.assertTrue(done - start < NUM_PROCESSES * DELAY_SECS)
-        self.assertEquals([output[1] for output in command_outputs], ["hello\n"] * NUM_PROCESSES)
-        self.assertEquals([],  multiprocessing.active_children())
+        self.assertEqual([output[1] for output in command_outputs], ["hello\n"] * NUM_PROCESSES)
+        self.assertEqual([],  multiprocessing.active_children())
 
     def test_run_in_parallel_assert_nonempty(self):
         self.assertRaises(AssertionError, Executive().run_in_parallel, [])
index 2a6ccbf..391c1d9 100644 (file)
@@ -52,7 +52,7 @@ class MockFileSystemTest(unittest.TestCase, filesystem_unittest.GenericFileSyste
             else:
                 expected = good_fn(test)
                 actual = test_fn(test)
-            self.assertEquals(expected, actual, 'given %s, expected %s, got %s' % (repr(test), repr(expected), repr(actual)))
+            self.assertEqual(expected, actual, 'given %s, expected %s, got %s' % (repr(test), repr(expected), repr(actual)))
 
     def test_join(self):
         self.quick_check(self.fs.join,
index e6d1e42..d656b25 100644 (file)
@@ -60,19 +60,19 @@ class GenericFileSystemTests(object):
 
     def test_glob__trailing_asterisk(self):
         self.fs.chdir(self.generic_test_dir)
-        self.assertEquals(set(self.fs.glob('fo*')), set(['foo.txt', 'foobar', 'foodir']))
+        self.assertEqual(set(self.fs.glob('fo*')), set(['foo.txt', 'foobar', 'foodir']))
 
     def test_glob__leading_asterisk(self):
         self.fs.chdir(self.generic_test_dir)
-        self.assertEquals(set(self.fs.glob('*xt')), set(['foo.txt']))
+        self.assertEqual(set(self.fs.glob('*xt')), set(['foo.txt']))
 
     def test_glob__middle_asterisk(self):
         self.fs.chdir(self.generic_test_dir)
-        self.assertEquals(set(self.fs.glob('f*r')), set(['foobar', 'foodir']))
+        self.assertEqual(set(self.fs.glob('f*r')), set(['foobar', 'foodir']))
 
     def test_glob__period_is_escaped(self):
         self.fs.chdir(self.generic_test_dir)
-        self.assertEquals(set(self.fs.glob('foo.*')), set(['foo.txt']))
+        self.assertEqual(set(self.fs.glob('foo.*')), set(['foo.txt']))
 
 class RealFileSystemTest(unittest.TestCase, GenericFileSystemTests):
     def setUp(self):
@@ -94,7 +94,7 @@ class RealFileSystemTest(unittest.TestCase, GenericFileSystemTests):
         if sys.platform == 'win32':
             newdir = 'c:\\'
         fs.chdir(newdir)
-        self.assertEquals(fs.getcwd(), newdir)
+        self.assertEqual(fs.getcwd(), newdir)
         fs.chdir(cwd)
 
     def test_chdir__notexists(self):
@@ -246,13 +246,13 @@ class RealFileSystemTest(unittest.TestCase, GenericFileSystemTests):
 
         fs = FileSystem()
         self.assertTrue(fs.remove('filename', remove_with_exception))
-        self.assertEquals(-1, RealFileSystemTest._remove_failures)
+        self.assertEqual(-1, RealFileSystemTest._remove_failures)
 
     def test_sep(self):
         fs = FileSystem()
 
-        self.assertEquals(fs.sep, os.sep)
-        self.assertEquals(fs.join("foo", "bar"),
+        self.assertEqual(fs.sep, os.sep)
+        self.assertEqual(fs.join("foo", "bar"),
                           os.path.join("foo", "bar"))
 
 
index e361cb5..0cfa6cb 100644 (file)
@@ -72,7 +72,7 @@ class TestLogStream(object):
         messages: A list of log message strings.
 
         """
-        self._test_case.assertEquals(messages, self.messages)
+        self._test_case.assertEqual(messages, self.messages)
 
 
 class LogTesting(object):
index 72789eb..6d7cc4d 100644 (file)
@@ -37,7 +37,7 @@ class GetLoggerTest(unittest.TestCase):
 
     def test_get_logger_in_webkitpy(self):
         logger = logutils.get_logger(__file__)
-        self.assertEquals(logger.name, "webkitpy.common.system.logutils_unittest")
+        self.assertEqual(logger.name, "webkitpy.common.system.logutils_unittest")
 
     def test_get_logger_not_in_webkitpy(self):
         # Temporarily change the working directory so that we
@@ -47,10 +47,10 @@ class GetLoggerTest(unittest.TestCase):
         os.chdir(root_dir)
 
         logger = logutils.get_logger("/Tools/Scripts/test-webkitpy")
-        self.assertEquals(logger.name, "test-webkitpy")
+        self.assertEqual(logger.name, "test-webkitpy")
 
         logger = logutils.get_logger("/Tools/Scripts/test-webkitpy.py")
-        self.assertEquals(logger.name, "test-webkitpy")
+        self.assertEqual(logger.name, "test-webkitpy")
 
         os.chdir(working_directory)
 
index 78a12f0..26670d2 100644 (file)
@@ -115,7 +115,7 @@ class OutputCaptureTestCaseBase(unittest.TestCase):
         unittest.TestCase.tearDown(self)
 
     def assertStdout(self, expected_stdout):
-        self.assertEquals(expected_stdout, self.__captured_stdout.getvalue())
+        self.assertEqual(expected_stdout, self.__captured_stdout.getvalue())
 
     def assertStderr(self, expected_stderr):
-        self.assertEquals(expected_stderr, self.__captured_stderr.getvalue())
+        self.assertEqual(expected_stderr, self.__captured_stderr.getvalue())
index 954d32d..7a71958 100644 (file)
@@ -41,28 +41,28 @@ class AbspathTest(unittest.TestCase):
     def test_abspath_to_uri_cygwin(self):
         if sys.platform != 'cygwin':
             return
-        self.assertEquals(path.abspath_to_uri(self.platforminfo(), '/cygdrive/c/foo/bar.html'),
+        self.assertEqual(path.abspath_to_uri(self.platforminfo(), '/cygdrive/c/foo/bar.html'),
                           'file:///C:/foo/bar.html')
 
     def test_abspath_to_uri_unixy(self):
-        self.assertEquals(path.abspath_to_uri(MockPlatformInfo(), "/foo/bar.html"),
+        self.assertEqual(path.abspath_to_uri(MockPlatformInfo(), "/foo/bar.html"),
                           'file:///foo/bar.html')
 
     def test_abspath_to_uri_win(self):
         if sys.platform != 'win32':
             return
-        self.assertEquals(path.abspath_to_uri(self.platforminfo(), 'c:\\foo\\bar.html'),
+        self.assertEqual(path.abspath_to_uri(self.platforminfo(), 'c:\\foo\\bar.html'),
                          'file:///c:/foo/bar.html')
 
     def test_abspath_to_uri_escaping_unixy(self):
-        self.assertEquals(path.abspath_to_uri(MockPlatformInfo(), '/foo/bar + baz%?.html'),
+        self.assertEqual(path.abspath_to_uri(MockPlatformInfo(), '/foo/bar + baz%?.html'),
                          'file:///foo/bar%20+%20baz%25%3F.html')
 
         # Note that you can't have '?' in a filename on windows.
     def test_abspath_to_uri_escaping_cygwin(self):
         if sys.platform != 'cygwin':
             return
-        self.assertEquals(path.abspath_to_uri(self.platforminfo(), '/cygdrive/c/foo/bar + baz%.html'),
+        self.assertEqual(path.abspath_to_uri(self.platforminfo(), '/cygdrive/c/foo/bar + baz%.html'),
                           'file:///C:/foo/bar%20+%20baz%25.html')
 
     def test_stop_cygpath_subprocess(self):
index a2b4255..327229e 100644 (file)
@@ -84,7 +84,7 @@ class TestPlatformInfo(unittest.TestCase):
         if info.is_mac():
             self.assertTrue(info.total_bytes_memory() > 0)
         else:
-            self.assertEquals(info.total_bytes_memory(), None)
+            self.assertEqual(info.total_bytes_memory(), None)
 
     def test_os_name_and_wrappers(self):
         info = self.make_info(fake_sys('linux2'))
@@ -100,28 +100,28 @@ class TestPlatformInfo(unittest.TestCase):
         self.assertFalse(info.is_freebsd())
 
         info = self.make_info(fake_sys('darwin'), fake_platform('10.6.3'))
-        self.assertEquals(info.os_name, 'mac')
+        self.assertEqual(info.os_name, 'mac')
         self.assertFalse(info.is_linux())
         self.assertTrue(info.is_mac())
         self.assertFalse(info.is_win())
         self.assertFalse(info.is_freebsd())
 
         info = self.make_info(fake_sys('win32', tuple([6, 1, 7600])))
-        self.assertEquals(info.os_name, 'win')
+        self.assertEqual(info.os_name, 'win')
         self.assertFalse(info.is_linux())
         self.assertFalse(info.is_mac())
         self.assertTrue(info.is_win())
         self.assertFalse(info.is_freebsd())
 
         info = self.make_info(fake_sys('cygwin'), executive=fake_executive('6.1.7600'))
-        self.assertEquals(info.os_name, 'win')
+        self.assertEqual(info.os_name, 'win')
         self.assertFalse(info.is_linux())
         self.assertFalse(info.is_mac())
         self.assertTrue(info.is_win())
         self.assertFalse(info.is_freebsd())
 
         info = self.make_info(fake_sys('freebsd8'))
-        self.assertEquals(info.os_name, 'freebsd')
+        self.assertEqual(info.os_name, 'freebsd')
         self.assertFalse(info.is_linux())
         self.assertFalse(info.is_mac())
         self.assertFalse(info.is_win())
@@ -131,28 +131,28 @@ class TestPlatformInfo(unittest.TestCase):
 
     def test_os_version(self):
         self.assertRaises(AssertionError, self.make_info, fake_sys('darwin'), fake_platform('10.4.3'))
-        self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.5.1')).os_version, 'leopard')
-        self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.6.1')).os_version, 'snowleopard')
-        self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.7.1')).os_version, 'lion')
-        self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.8.1')).os_version, 'mountainlion')
-        self.assertEquals(self.make_info(fake_sys('darwin'), fake_platform('10.9.0')).os_version, 'future')
+        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.5.1')).os_version, 'leopard')
+        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.6.1')).os_version, 'snowleopard')
+        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.7.1')).os_version, 'lion')
+        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.8.1')).os_version, 'mountainlion')
+        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.9.0')).os_version, 'future')
 
-        self.assertEquals(self.make_info(fake_sys('linux2')).os_version, 'lucid')
+        self.assertEqual(self.make_info(fake_sys('linux2')).os_version, 'lucid')
 
-        self.assertEquals(self.make_info(fake_sys('freebsd8'), fake_platform('', '8.3-PRERELEASE')).os_version, '8.3-PRERELEASE')
-        self.assertEquals(self.make_info(fake_sys('freebsd9'), fake_platform('', '9.0-RELEASE')).os_version, '9.0-RELEASE')
+        self.assertEqual(self.make_info(fake_sys('freebsd8'), fake_platform('', '8.3-PRERELEASE')).os_version, '8.3-PRERELEASE')
+        self.assertEqual(self.make_info(fake_sys('freebsd9'), fake_platform('', '9.0-RELEASE')).os_version, '9.0-RELEASE')
 
         self.assertRaises(AssertionError, self.make_info, fake_sys('win32', tuple([5, 0, 1234])))
-        self.assertEquals(self.make_info(fake_sys('win32', tuple([6, 2, 1234]))).os_version, 'future')
-        self.assertEquals(self.make_info(fake_sys('win32', tuple([6, 1, 7600]))).os_version, '7sp0')
-        self.assertEquals(self.make_info(fake_sys('win32', tuple([6, 0, 1234]))).os_version, 'vista')
-        self.assertEquals(self.make_info(fake_sys('win32', tuple([5, 1, 1234]))).os_version, 'xp')
+        self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 2, 1234]))).os_version, 'future')
+        self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 1, 7600]))).os_version, '7sp0')
+        self.assertEqual(self.make_info(fake_sys('win32', tuple([6, 0, 1234]))).os_version, 'vista')
+        self.assertEqual(self.make_info(fake_sys('win32', tuple([5, 1, 1234]))).os_version, 'xp')
 
         self.assertRaises(AssertionError, self.make_info, fake_sys('win32'), executive=fake_executive('5.0.1234'))
-        self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.2.1234')).os_version, 'future')
-        self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.1.7600')).os_version, '7sp0')
-        self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.0.1234')).os_version, 'vista')
-        self.assertEquals(self.make_info(fake_sys('cygwin'), executive=fake_executive('5.1.1234')).os_version, 'xp')
+        self.assertEqual(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.2.1234')).os_version, 'future')
+        self.assertEqual(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.1.7600')).os_version, '7sp0')
+        self.assertEqual(self.make_info(fake_sys('cygwin'), executive=fake_executive('6.0.1234')).os_version, 'vista')
+        self.assertEqual(self.make_info(fake_sys('cygwin'), executive=fake_executive('5.1.1234')).os_version, 'xp')
 
     def test_display_name(self):
         info = self.make_info(fake_sys('darwin'))
@@ -169,16 +169,16 @@ class TestPlatformInfo(unittest.TestCase):
 
     def test_total_bytes_memory(self):
         info = self.make_info(fake_sys('darwin'), fake_platform('10.6.3'), fake_executive('1234'))
-        self.assertEquals(info.total_bytes_memory(), 1234)
+        self.assertEqual(info.total_bytes_memory(), 1234)
 
         info = self.make_info(fake_sys('win32', tuple([6, 1, 7600])))
-        self.assertEquals(info.total_bytes_memory(), None)
+        self.assertEqual(info.total_bytes_memory(), None)
 
         info = self.make_info(fake_sys('linux2'))
-        self.assertEquals(info.total_bytes_memory(), None)
+        self.assertEqual(info.total_bytes_memory(), None)
 
         info = self.make_info(fake_sys('freebsd9'))
-        self.assertEquals(info.total_bytes_memory(), None)
+        self.assertEqual(info.total_bytes_memory(), None)
 
 
 if __name__ == '__main__':
index 86b9db7..bd86d22 100644 (file)
@@ -120,12 +120,12 @@ class UserTest(unittest.TestCase):
             expected, inputs = test_case
 
             def mock_raw_input(message):
-                self.assertEquals(expected[0], message)
+                self.assertEqual(expected[0], message)
                 return inputs[1]
 
             result = User().confirm(default=inputs[0],
                                     raw_input=mock_raw_input)
-            self.assertEquals(expected[1], result)
+            self.assertEqual(expected[1], result)
 
     def test_warn_if_application_is_xcode(self):
         output = OutputCapture()
index 16a74cb..22ba720 100644 (file)
@@ -67,15 +67,15 @@ class ZipFileSetTest(unittest.TestCase):
 
     def test_open(self):
         file = self._zip.open('a/b/some-other-file')
-        self.assertEquals('a/b/some-other-file', file.name())
-        self.assertEquals('other contents', file.contents())
+        self.assertEqual('a/b/some-other-file', file.name())
+        self.assertEqual('other contents', file.contents())
 
     def test_close(self):
         zipfileset = ZipFileSet('blah', self._filesystem, self.make_fake_zip)
         zipfileset.close()
 
     def test_read(self):
-        self.assertEquals('contents', self._zip.read('some-file'))
+        self.assertEqual('contents', self._zip.read('some-file'))
 
     def test_extract(self):
         self._filesystem.maybe_make_directory('/some-dir')
index 09010b2..67ff3b0 100644 (file)
@@ -52,7 +52,7 @@ class WatchListTest(unittest.TestCase):
             '        ],'
            '    },'
             '}')
-        self.assertEquals(set([]), watch_list.find_matching_definitions(DIFF_TEST_DATA))
+        self.assertEqual(set([]), watch_list.find_matching_definitions(DIFF_TEST_DATA))
 
     def test_filename_definition(self):
         watch_list = self._watch_list_parser.parse(
@@ -68,7 +68,7 @@ class WatchListTest(unittest.TestCase):
             '        ],'
            '    },'
             '}')
-        self.assertEquals(set(['WatchList1']), watch_list.find_matching_definitions(DIFF_TEST_DATA))
+        self.assertEqual(set(['WatchList1']), watch_list.find_matching_definitions(DIFF_TEST_DATA))
 
     def test_cc_rules_simple(self):
         watch_list = self._watch_list_parser.parse(
@@ -85,7 +85,7 @@ class WatchListTest(unittest.TestCase):
            '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': ['levin@chromium.org'],
                 'messages': [],
                 }, cc_and_messages)
@@ -109,7 +109,7 @@ class WatchListTest(unittest.TestCase):
             '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': ['levin@chromium.org'],
                 'messages': [],
                 }, cc_and_messages)
@@ -136,7 +136,7 @@ class WatchListTest(unittest.TestCase):
             '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': ['levin@chromium.org'],
                 'messages': ['msg1', 'msg2'],
                 }, cc_and_messages)
@@ -163,7 +163,7 @@ class WatchListTest(unittest.TestCase):
             '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': [],
                 'messages': [],
                 }, cc_and_messages)
@@ -185,7 +185,7 @@ class WatchListTest(unittest.TestCase):
             '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': ['eric@webkit.org'],
                 'messages': [],
                 }, cc_and_messages)
@@ -207,7 +207,7 @@ class WatchListTest(unittest.TestCase):
             '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': ['abarth@webkit.org'],
                 'messages': [],
                 }, cc_and_messages)
@@ -236,7 +236,7 @@ class WatchListTest(unittest.TestCase):
             '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': ['levin@chromium.org'],
                 'messages': ["Test message."],
                 }, cc_and_messages)
@@ -271,7 +271,7 @@ class WatchListTest(unittest.TestCase):
             '    },'
             '}')
         cc_and_messages = watch_list.determine_cc_and_messages(DIFF_TEST_DATA)
-        self.assertEquals({
+        self.assertEqual({
                 'cc_list': ['eric@webkit.org'],
                 'messages': ["This is a test message."],
                 }, cc_and_messages)
index 4efa4e0..501fb43 100644 (file)
@@ -75,14 +75,14 @@ class LockCheckingRunner(LayoutTestRunner):
 
     def handle_finished_list(self, source, list_name, num_tests, elapsed_time):
         if not self._finished_list_called:
-            self._tester.assertEquals(list_name, 'locked_tests')
+            self._tester.assertEqual(list_name, 'locked_tests')
             self._tester.assertTrue(self._remaining_locked_shards)
             self._tester.assertTrue(self._has_http_lock is self._should_have_http_lock)
 
         super(LockCheckingRunner, self).handle_finished_list(source, list_name, num_tests, elapsed_time)
 
         if not self._finished_list_called:
-            self._tester.assertEquals(self._remaining_locked_shards, [])
+            self._tester.assertEqual(self._remaining_locked_shards, [])
             self._tester.assertFalse(self._has_http_lock)
             self._finished_list_called = True
 
@@ -136,8 +136,8 @@ class LayoutTestRunnerTests(unittest.TestCase):
         # Interrupt if we've exceeded either limit:
         runner._options.exit_after_n_crashes_or_timeouts = 10
         self.assertRaises(TestRunInterruptedException, runner._interrupt_if_at_failure_limits, result_summary)
-        self.assertEquals(result_summary.results['passes/text.html'].type, test_expectations.SKIP)
-        self.assertEquals(result_summary.results['passes/image.html'].type, test_expectations.SKIP)
+        self.assertEqual(result_summary.results['passes/text.html'].type, test_expectations.SKIP)
+        self.assertEqual(result_summary.results['passes/image.html'].type, test_expectations.SKIP)
 
         runner._options.exit_after_n_crashes_or_timeouts = None
         runner._options.exit_after_n_failures = 10
@@ -154,14 +154,14 @@ class LayoutTestRunnerTests(unittest.TestCase):
         result_summary = ResultSummary(expectations, [test], 1, set())
         result = TestResult(test_name=test, failures=[test_failures.FailureReftestMismatchDidNotOccur()], reftest_type=['!='])
         runner._update_summary_with_result(result_summary, result)
-        self.assertEquals(1, result_summary.expected)
-        self.assertEquals(0, result_summary.unexpected)
+        self.assertEqual(1, result_summary.expected)
+        self.assertEqual(0, result_summary.unexpected)
 
         result_summary = ResultSummary(expectations, [test], 1, set())
         result = TestResult(test_name=test, failures=[], reftest_type=['=='])
         runner._update_summary_with_result(result_summary, result)
-        self.assertEquals(0, result_summary.expected)
-        self.assertEquals(1, result_summary.unexpected)
+        self.assertEqual(0, result_summary.expected)
+        self.assertEqual(1, result_summary.unexpected)
 
     def test_servers_started(self):
 
@@ -189,31 +189,31 @@ class LayoutTestRunnerTests(unittest.TestCase):
         runner._needs_http = True
         runner._needs_websockets = False
         runner.start_servers_with_lock(number_of_servers=4)
-        self.assertEquals(self.http_started, True)
-        self.assertEquals(self.websocket_started, False)
+        self.assertEqual(self.http_started, True)
+        self.assertEqual(self.websocket_started, False)
         runner.stop_servers_with_lock()
-        self.assertEquals(self.http_stopped, True)
-        self.assertEquals(self.websocket_stopped, False)
+        self.assertEqual(self.http_stopped, True)
+        self.assertEqual(self.websocket_stopped, False)
 
         self.http_started = self.http_stopped = self.websocket_started = self.websocket_stopped = False
         runner._needs_http = True
         runner._needs_websockets = True
         runner.start_servers_with_lock(number_of_servers=4)
-        self.assertEquals(self.http_started, True)
-        self.assertEquals(self.websocket_started, True)
+        self.assertEqual(self.http_started, True)
+        self.assertEqual(self.websocket_started, True)
         runner.stop_servers_with_lock()
-        self.assertEquals(self.http_stopped, True)
-        self.assertEquals(self.websocket_stopped, True)
+        self.assertEqual(self.http_stopped, True)
+        self.assertEqual(self.websocket_stopped, True)
 
         self.http_started = self.http_stopped = self.websocket_started = self.websocket_stopped = False
         runner._needs_http = False
         runner._needs_websockets = False
         runner.start_servers_with_lock(number_of_servers=4)
-        self.assertEquals(self.http_started, False)
-        self.assertEquals(self.websocket_started, False)
+        self.assertEqual(self.http_started, False)
+        self.assertEqual(self.websocket_started, False)
         runner.stop_servers_with_lock()
-        self.assertEquals(self.http_stopped, False)
-        self.assertEquals(self.websocket_stopped, False)
+        self.assertEqual(self.http_stopped, False)
+        self.assertEqual(self.websocket_stopped, False)
 
 
 class SharderTests(unittest.TestCase):
@@ -245,11 +245,11 @@ class SharderTests(unittest.TestCase):
         return self.sharder.shard_tests([self.get_test_input(test) for test in test_list], num_workers, fully_parallel)
 
     def assert_shards(self, actual_shards, expected_shard_names):
-        self.assertEquals(len(actual_shards), len(expected_shard_names))
+        self.assertEqual(len(actual_shards), len(expected_shard_names))
         for i, shard in enumerate(actual_shards):
             expected_shard_name, expected_test_names = expected_shard_names[i]
-            self.assertEquals(shard.name, expected_shard_name)
-            self.assertEquals([test_input.test_name for test_input in shard.test_inputs],
+            self.assertEqual(shard.name, expected_shard_name)
+            self.assertEqual([test_input.test_name for test_input in shard.test_inputs],
                               expected_test_names)
 
     def test_shard_by_dir(self):
@@ -307,14 +307,14 @@ class SharderTests(unittest.TestCase):
     def test_shard_in_two_has_no_locked_shards(self):
         locked, unlocked = self.get_shards(num_workers=1, fully_parallel=False,
              test_list=['animations/keyframe.html'])
-        self.assertEquals(len(locked), 0)
-        self.assertEquals(len(unlocked), 1)
+        self.assertEqual(len(locked), 0)
+        self.assertEqual(len(unlocked), 1)
 
     def test_shard_in_two_has_no_unlocked_shards(self):
         locked, unlocked = self.get_shards(num_workers=1, fully_parallel=False,
              test_list=['http/tests/websocket/tests/unicode.htm'])
-        self.assertEquals(len(locked), 1)
-        self.assertEquals(len(unlocked), 0)
+        self.assertEqual(len(locked), 1)
+        self.assertEqual(len(unlocked), 0)
 
     def test_multiple_locked_shards(self):
         locked, unlocked = self.get_shards(num_workers=4, fully_parallel=False, max_locked_shards=2)
@@ -339,7 +339,7 @@ class SharderTests(unittest.TestCase):
 
 class NaturalCompareTest(unittest.TestCase):
     def assert_cmp(self, x, y, result):
-        self.assertEquals(cmp(Sharder.natural_sort_key(x), Sharder.natural_sort_key(y)), result)
+        self.assertEqual(cmp(Sharder.natural_sort_key(x), Sharder.natural_sort_key(y)), result)
 
     def test_natural_compare(self):
         self.assert_cmp('a', 'a', 0)
@@ -369,7 +369,7 @@ class KeyCompareTest(unittest.TestCase):
         self.sharder = Sharder(split, '/', 1)
 
     def assert_cmp(self, x, y, result):
-        self.assertEquals(cmp(self.sharder.test_key(x), self.sharder.test_key(y)), result)
+        self.assertEqual(cmp(self.sharder.test_key(x), self.sharder.test_key(y)), result)
 
     def test_test_key(self):
         self.assert_cmp('/a', '/a', 0)
index 5c43b6a..ec99cf6 100644 (file)
@@ -51,22 +51,22 @@ class TestConfigurationTest(unittest.TestCase):
         result_config_dict = {}
         for category, specifier in config.items():
             result_config_dict[category] = specifier
-        self.assertEquals({'version': 'xp', 'architecture': 'x86', 'build_type': 'release'}, result_config_dict)
+        self.assertEqual({'version': 'xp', 'architecture': 'x86', 'build_type': 'release'}, result_config_dict)
 
     def test_keys(self):
         config = TestConfiguration('xp', 'x86', 'release')
         result_config_keys = []
         for category in config.keys():
             result_config_keys.append(category)
-        self.assertEquals(set(['version', 'architecture', 'build_type']), set(result_config_keys))
+        self.assertEqual(set(['version', 'architecture', 'build_type']), set(result_config_keys))
 
     def test_str(self):
         config = TestConfiguration('xp', 'x86', 'release')
-        self.assertEquals('<xp, x86, release>', str(config))
+        self.assertEqual('<xp, x86, release>', str(config))
 
     def test_repr(self):
         config = TestConfiguration('xp', 'x86', 'release')
-        self.assertEquals("TestConfig(version='xp', architecture='x86', build_type='release')", repr(config))
+        self.assertEqual("TestConfig(version='xp', architecture='x86', build_type='release')", repr(config))
 
     def test_hash(self):
         config_dict = {}
@@ -81,11 +81,11 @@ class TestConfigurationTest(unittest.TestCase):
         self.assertTrue(TestConfiguration('xp', 'x86', 'release') in config_dict)
         self.assertFalse(TestConfiguration('xp', 'x86', 'debug') in config_dict)
         configs_list = [TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'debug'), TestConfiguration('xp', 'x86', 'debug')]
-        self.assertEquals(len(configs_list), 3)
-        self.assertEquals(len(set(configs_list)), 2)
+        self.assertEqual(len(configs_list), 3)
+        self.assertEqual(len(set(configs_list)), 2)
 
     def test_eq(self):
-        self.assertEquals(TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'release'))
+        self.assertEqual(TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'release'))
         self.assertNotEquals(TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'debug'))
 
     def test_values(self):
@@ -93,7 +93,7 @@ class TestConfigurationTest(unittest.TestCase):
         result_config_values = []
         for value in config.values():
             result_config_values.append(value)
-        self.assertEquals(set(['xp', 'x86', 'release']), set(result_config_values))
+        self.assertEqual(set(['xp', 'x86', 'release']), set(result_config_values))
 
 
 class SpecifierSorterTest(unittest.TestCase):
@@ -103,48 +103,48 @@ class SpecifierSorterTest(unittest.TestCase):
 
     def test_init(self):
         sorter = SpecifierSorter()
-        self.assertEquals(sorter.category_for_specifier('control'), None)
+        self.assertEqual(sorter.category_for_specifier('control'), None)
         sorter = SpecifierSorter(self._all_test_configurations)
-        self.assertEquals(sorter.category_for_specifier('xp'), 'version')
+        self.assertEqual(sorter.category_for_specifier('xp'), 'version')
         sorter = SpecifierSorter(self._all_test_configurations, MOCK_MACROS)
-        self.assertEquals(sorter.category_for_specifier('mac'), 'version')
+        self.assertEqual(sorter.category_for_specifier('mac'), 'version')
 
     def test_add_specifier(self):
         sorter = SpecifierSorter()
-        self.assertEquals(sorter.category_for_specifier('control'), None)
+        self.assertEqual(sorter.category_for_specifier('control'), None)
         sorter.add_specifier('version', 'control')
-        self.assertEquals(sorter.category_for_specifier('control'), 'version')
+        self.assertEqual(sorter.category_for_specifier('control'), 'version')
         sorter.add_specifier('version', 'one')
-        self.assertEquals(sorter.category_for_specifier('one'), 'version')
+        self.assertEqual(sorter.category_for_specifier('one'), 'version')
         sorter.add_specifier('architecture', 'renaissance')
-        self.assertEquals(sorter.category_for_specifier('one'), 'version')
-        self.assertEquals(sorter.category_for_specifier('renaissance'), 'architecture')
+        self.assertEqual(sorter.category_for_specifier('one'), 'version')
+        self.assertEqual(sorter.category_for_specifier('renaissance'), 'architecture')
 
     def test_add_macros(self):
         sorter = SpecifierSorter(self._all_test_configurations)
         sorter.add_macros(MOCK_MACROS)
-        self.assertEquals(sorter.category_for_specifier('mac'), 'version')
-        self.assertEquals(sorter.category_for_specifier('win'), 'version')
-        self.assertEquals(sorter.category_for_specifier('x86'), 'architecture')
+        self.assertEqual(sorter.category_for_specifier('mac'), 'version')
+        self.assertEqual(sorter.category_for_specifier('win'), 'version')
+        self.assertEqual(sorter.category_for_specifier('x86'), 'architecture')
 
     def test_category_priority(self):
         sorter = SpecifierSorter(self._all_test_configurations)
-        self.assertEquals(sorter.category_priority('version'), 0)
-        self.assertEquals(sorter.category_priority('build_type'), 2)
+        self.assertEqual(sorter.category_priority('version'), 0)
+        self.assertEqual(sorter.category_priority('build_type'), 2)
 
     def test_specifier_priority(self):
         sorter = SpecifierSorter(self._all_test_configurations)
-        self.assertEquals(sorter.specifier_priority('x86'), 1)
-        self.assertEquals(sorter.specifier_priority('snowleopard'), 0)
+        self.assertEqual(sorter.specifier_priority('x86'), 1)
+        self.assertEqual(sorter.specifier_priority('snowleopard'), 0)
 
     def test_sort_specifiers(self):
         sorter = SpecifierSorter(self._all_test_configurations, MOCK_MACROS)
-        self.assertEquals(sorter.sort_specifiers(set()), [])
-        self.assertEquals(sorter.sort_specifiers(set(['x86'])), ['x86'])
-        self.assertEquals(sorter.sort_specifiers(set(['x86', 'win7'])), ['win7', 'x86'])
-        self.assertEquals(sorter.sort_specifiers(set(['x86', 'debug', 'win7'])), ['win7', 'x86', 'debug'])
-        self.assertEquals(sorter.sort_specifiers(set(['snowleopard', 'x86', 'debug', 'win7'])), ['snowleopard', 'win7', 'x86', 'debug'])
-        self.assertEquals(sorter.sort_specifiers(set(['x86', 'mac', 'debug', 'win7'])), ['mac', 'win7', 'x86', 'debug'])
+        self.assertEqual(sorter.sort_specifiers(set()), [])
+        self.assertEqual(sorter.sort_specifiers(set(['x86'])), ['x86'])
+        self.assertEqual(sorter.sort_specifiers(set(['x86', 'win7'])), ['win7', 'x86'])
+        self.assertEqual(sorter.sort_specifiers(set(['x86', 'debug', 'win7'])), ['win7', 'x86', 'debug'])
+        self.assertEqual(sorter.sort_specifiers(set(['snowleopard', 'x86', 'debug', 'win7'])), ['snowleopard', 'win7', 'x86', 'debug'])
+        self.assertEqual(sorter.sort_specifiers(set(['x86', 'mac', 'debug', 'win7'])), ['mac', 'win7', 'x86', 'debug'])
 
 
 class TestConfigurationConverterTest(unittest.TestCase):
@@ -153,28 +153,28 @@ class TestConfigurationConverterTest(unittest.TestCase):
         unittest.TestCase.__init__(self, testFunc)
 
     def test_symmetric_difference(self):
-        self.assertEquals(TestConfigurationConverter.symmetric_difference([set(['a', 'b']), set(['b', 'c'])]), set(['a', 'c']))
-        self.assertEquals(TestConfigurationConverter.symmetric_difference([set(['a', 'b']), set(['b', 'c']), set(['b', 'd'])]), set(['a', 'c', 'd']))
+        self.assertEqual(TestConfigurationConverter.symmetric_difference([set(['a', 'b']), set(['b', 'c'])]), set(['a', 'c']))
+        self.assertEqual(TestConfigurationConverter.symmetric_difference([set(['a', 'b']), set(['b', 'c']), set(['b', 'd'])]), set(['a', 'c', 'd']))
 
     def test_to_config_set(self):
         converter = TestConfigurationConverter(self._all_test_configurations)
 
-        self.assertEquals(converter.to_config_set(set()), self._all_test_configurations)
+        self.assertEqual(converter.to_config_set(set()), self._all_test_configurations)
 
-        self.assertEquals(converter.to_config_set(set(['foo'])), set())
+        self.assertEqual(converter.to_config_set(set(['foo'])), set())
 
-        self.assertEquals(converter.to_config_set(set(['xp', 'foo'])), set())
+        self.assertEqual(converter.to_config_set(set(['xp', 'foo'])), set())
 
         errors = []
-        self.assertEquals(converter.to_config_set(set(['xp', 'foo']), errors), set())
-        self.assertEquals(errors, ["Unrecognized modifier 'foo'"])
+        self.assertEqual(converter.to_config_set(set(['xp', 'foo']), errors), set())
+        self.assertEqual(errors, ["Unrecognized modifier 'foo'"])
 
-        self.assertEquals(converter.to_config_set(set(['xp', 'x86_64'])), set())
+        self.assertEqual(converter.to_config_set(set(['xp', 'x86_64'])), set())
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_config_set(set(['xp', 'release'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['xp', 'release'])), configs_to_match)
 
         configs_to_match = set([
             TestConfiguration('snowleopard', 'x86', 'release'),
@@ -184,13 +184,13 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('lucid', 'x86', 'release'),
             TestConfiguration('lucid', 'x86_64', 'release'),
        ])
-        self.assertEquals(converter.to_config_set(set(['release'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['release'])), configs_to_match)
 
         configs_to_match = set([
              TestConfiguration('lucid', 'x86_64', 'release'),
              TestConfiguration('lucid', 'x86_64', 'debug'),
         ])
-        self.assertEquals(converter.to_config_set(set(['x86_64'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['x86_64'])), configs_to_match)
 
         configs_to_match = set([
             TestConfiguration('lucid', 'x86_64', 'release'),
@@ -200,7 +200,7 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('snowleopard', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'debug'),
         ])
-        self.assertEquals(converter.to_config_set(set(['lucid', 'snowleopard'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['lucid', 'snowleopard'])), configs_to_match)
 
         configs_to_match = set([
             TestConfiguration('lucid', 'x86', 'release'),
@@ -208,14 +208,14 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('snowleopard', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'debug'),
         ])
-        self.assertEquals(converter.to_config_set(set(['lucid', 'snowleopard', 'x86'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['lucid', 'snowleopard', 'x86'])), configs_to_match)
 
         configs_to_match = set([
             TestConfiguration('lucid', 'x86_64', 'release'),
             TestConfiguration('lucid', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_config_set(set(['lucid', 'snowleopard', 'release'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['lucid', 'snowleopard', 'release'])), configs_to_match)
 
     def test_macro_expansion(self):
         converter = TestConfigurationConverter(self._all_test_configurations, MOCK_MACROS)
@@ -225,7 +225,7 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('vista', 'x86', 'release'),
             TestConfiguration('win7', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_config_set(set(['win', 'release'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['win', 'release'])), configs_to_match)
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -234,7 +234,7 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('lucid', 'x86', 'release'),
             TestConfiguration('lucid', 'x86_64', 'release'),
         ])
-        self.assertEquals(converter.to_config_set(set(['win', 'lucid', 'release'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['win', 'lucid', 'release'])), configs_to_match)
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -242,30 +242,30 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('win7', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_config_set(set(['win', 'mac', 'release'])), configs_to_match)
+        self.assertEqual(converter.to_config_set(set(['win', 'mac', 'release'])), configs_to_match)
 
     def test_to_specifier_lists(self):
         converter = TestConfigurationConverter(self._all_test_configurations, MOCK_MACROS)
 
-        self.assertEquals(converter.to_specifiers_list(set(self._all_test_configurations)), [[]])
-        self.assertEquals(converter.to_specifiers_list(set()), [])
+        self.assertEqual(converter.to_specifiers_list(set(self._all_test_configurations)), [[]])
+        self.assertEqual(converter.to_specifiers_list(set()), [])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
             TestConfiguration('xp', 'x86', 'debug'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['xp'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['xp'])])
 
         configs_to_match = set([
             TestConfiguration('lucid', 'x86_64', 'debug'),
             TestConfiguration('xp', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp']), set(['debug', 'x86_64', 'linux'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp']), set(['debug', 'x86_64', 'linux'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -275,7 +275,7 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('lucid', 'x86_64', 'debug'),
             TestConfiguration('lucid', 'x86', 'debug'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp']), set(['debug', 'linux'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp']), set(['debug', 'linux'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -285,13 +285,13 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('lucid', 'x86', 'release'),
             TestConfiguration('lucid', 'x86_64', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['release'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['xp', 'mac', 'release'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['xp', 'mac', 'release'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -300,26 +300,26 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('win7', 'x86', 'debug'),
             TestConfiguration('lucid', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['win7']), set(['release', 'linux', 'x86']), set(['release', 'xp', 'mac'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win7']), set(['release', 'linux', 'x86']), set(['release', 'xp', 'mac'])])
 
     def test_macro_collapsing(self):
         macros = {'foo': ['bar', 'baz'], 'people': ['bob', 'alice', 'john']}
 
         specifiers_list = [set(['john', 'godzilla', 'bob', 'alice'])]
         TestConfigurationConverter.collapse_macros(macros, specifiers_list)
-        self.assertEquals(specifiers_list, [set(['people', 'godzilla'])])
+        self.assertEqual(specifiers_list, [set(['people', 'godzilla'])])
 
         specifiers_list = [set(['john', 'godzilla', 'alice'])]
         TestConfigurationConverter.collapse_macros(macros, specifiers_list)
-        self.assertEquals(specifiers_list, [set(['john', 'godzilla', 'alice', 'godzilla'])])
+        self.assertEqual(specifiers_list, [set(['john', 'godzilla', 'alice', 'godzilla'])])
 
         specifiers_list = [set(['bar', 'godzilla', 'baz', 'bob', 'alice', 'john'])]
         TestConfigurationConverter.collapse_macros(macros, specifiers_list)
-        self.assertEquals(specifiers_list, [set(['foo', 'godzilla', 'people'])])
+        self.assertEqual(specifiers_list, [set(['foo', 'godzilla', 'people'])])
 
         specifiers_list = [set(['bar', 'godzilla', 'baz', 'bob']), set(['bar', 'baz']), set(['people', 'alice', 'bob', 'john'])]
         TestConfigurationConverter.collapse_macros(macros, specifiers_list)
-        self.assertEquals(specifiers_list, [set(['bob', 'foo', 'godzilla']), set(['foo']), set(['people'])])
+        self.assertEqual(specifiers_list, [set(['bob', 'foo', 'godzilla']), set(['foo']), set(['people'])])
 
     def test_converter_macro_collapsing(self):
         converter = TestConfigurationConverter(self._all_test_configurations, MOCK_MACROS)
@@ -329,7 +329,7 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('vista', 'x86', 'release'),
             TestConfiguration('win7', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['win', 'release'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'release'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -338,7 +338,7 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('lucid', 'x86', 'release'),
             TestConfiguration('lucid', 'x86_64', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['win', 'linux', 'release'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'linux', 'release'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -346,7 +346,7 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('win7', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['win', 'mac', 'release'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'mac', 'release'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
@@ -354,16 +354,16 @@ class TestConfigurationConverterTest(unittest.TestCase):
             TestConfiguration('win7', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['win', 'mac', 'release'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'mac', 'release'])])
 
         configs_to_match = set([
             TestConfiguration('xp', 'x86', 'release'),
             TestConfiguration('vista', 'x86', 'release'),
             TestConfiguration('win7', 'x86', 'release'),
         ])
-        self.assertEquals(converter.to_specifiers_list(configs_to_match), [set(['win', 'release'])])
+        self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'release'])])
 
     def test_specifier_converter_access(self):
         specifier_sorter = TestConfigurationConverter(self._all_test_configurations, MOCK_MACROS).specifier_sorter()
-        self.assertEquals(specifier_sorter.category_for_specifier('snowleopard'), 'version')
-        self.assertEquals(specifier_sorter.category_for_specifier('mac'), 'version')
+        self.assertEqual(specifier_sorter.category_for_specifier('snowleopard'), 'version')
+        self.assertEqual(specifier_sorter.category_for_specifier('mac'), 'version')
index d78ae3f..bbe031c 100644 (file)
@@ -84,7 +84,7 @@ Bug(test) failures/expected/image.html [ WontFix Mac ]
         self._exp = TestExpectations(self._port, self.get_basic_tests(), expectations_to_lint=expectations_to_lint)
 
     def assert_exp(self, test, result):
-        self.assertEquals(self._exp.get_expectations(self.get_test(test)),
+        self.assertEqual(self._exp.get_expectations(self.get_test(test)),
                           set([result]))
 
     def assert_bad_expectations(self, expectations, overrides=None):
@@ -109,29 +109,29 @@ class MiscTests(Base):
 
     def test_result_was_expected(self):
         # test basics
-        self.assertEquals(TestExpectations.result_was_expected(PASS, set([PASS]), test_needs_rebaselining=False, test_is_skipped=False), True)
-        self.assertEquals(TestExpectations.result_was_expected(FAIL, set([PASS]), test_needs_rebaselining=False, test_is_skipped=False), False)
+        self.assertEqual(TestExpectations.result_was_expected(PASS, set([PASS]), test_needs_rebaselining=False, test_is_skipped=False), True)
+        self.assertEqual(TestExpectations.result_was_expected(FAIL, set([PASS]), test_needs_rebaselining=False, test_is_skipped=False), False)
 
         # test handling of SKIPped tests and results
-        self.assertEquals(TestExpectations.result_was_expected(SKIP, set([CRASH]), test_needs_rebaselining=False, test_is_skipped=True), True)
-        self.assertEquals(TestExpectations.result_was_expected(SKIP, set([CRASH]), test_needs_rebaselining=False, test_is_skipped=False), False)
+        self.assertEqual(TestExpectations.result_was_expected(SKIP, set([CRASH]), test_needs_rebaselining=False, test_is_skipped=True), True)
+        self.assertEqual(TestExpectations.result_was_expected(SKIP, set([CRASH]), test_needs_rebaselining=False, test_is_skipped=False), False)
 
         # test handling of MISSING results and the REBASELINE modifier
-        self.assertEquals(TestExpectations.result_was_expected(MISSING, set([PASS]), test_needs_rebaselining=True, test_is_skipped=False), True)
-        self.assertEquals(TestExpectations.result_was_expected(MISSING, set([PASS]), test_needs_rebaselining=False, test_is_skipped=False), False)
+        self.assertEqual(TestExpectations.result_was_expected(MISSING, set([PASS]), test_needs_rebaselining=True, test_is_skipped=False), True)
+        self.assertEqual(TestExpectations.result_was_expected(MISSING, set([PASS]), test_needs_rebaselining=False, test_is_skipped=False), False)
 
     def test_remove_pixel_failures(self):
-        self.assertEquals(TestExpectations.remove_pixel_failures(set([FAIL])), set([FAIL]))
-        self.assertEquals(TestExpectations.remove_pixel_failures(set([PASS])), set([PASS]))
-        self.assertEquals(TestExpectations.remove_pixel_failures(set([IMAGE])), set([PASS]))
-        self.assertEquals(TestExpectations.remove_pixel_failures(set([FAIL])), set([FAIL]))
-        self.assertEquals(TestExpectations.remove_pixel_failures(set([PASS, IMAGE, CRASH])), set([PASS, CRASH]))
+        self.assertEqual(TestExpectations.remove_pixel_failures(set([FAIL])), set([FAIL]))
+        self.assertEqual(TestExpectations.remove_pixel_failures(set([PASS])), set([PASS]))
+        self.assertEqual(TestExpectations.remove_pixel_failures(set([IMAGE])), set([PASS]))
+        self.assertEqual(TestExpectations.remove_pixel_failures(set([FAIL])), set([FAIL]))
+        self.assertEqual(TestExpectations.remove_pixel_failures(set([PASS, IMAGE, CRASH])), set([PASS, CRASH]))
 
     def test_suffixes_for_expectations(self):
-        self.assertEquals(TestExpectations.suffixes_for_expectations(set([FAIL])), set(['txt', 'png', 'wav']))
-        self.assertEquals(TestExpectations.suffixes_for_expectations(set([IMAGE])), set(['png']))
-        self.assertEquals(TestExpectations.suffixes_for_expectations(set([FAIL, IMAGE, CRASH])), set(['txt', 'png', 'wav']))
-        self.assertEquals(TestExpectations.suffixes_for_expectations(set()), set())
+        self.assertEqual(TestExpectations.suffixes_for_expectations(set([FAIL])), set(['txt', 'png', 'wav']))
+        self.assertEqual(TestExpectations.suffixes_for_expectations(set([IMAGE])), set(['png']))
+        self.assertEqual(TestExpectations.suffixes_for_expectations(set([FAIL, IMAGE, CRASH])), set(['txt', 'png', 'wav']))
+        self.assertEqual(TestExpectations.suffixes_for_expectations(set()), set())
 
     def test_category_expectations(self):
         # This test checks unknown tests are not present in the
@@ -152,7 +152,7 @@ class MiscTests(Base):
 
     def test_get_expectations_string(self):
         self.parse_exp(self.get_basic_expectations())
-        self.assertEquals(self._exp.get_expectations_string(
+        self.assertEqual(self._exp.get_expectations_string(
                           self.get_test('failures/expected/text.html')),
                           'FAIL')
 
@@ -261,9 +261,9 @@ class SkippedTests(Base):
         exp = TestExpectations(port, ['failures/expected/text.html'], expectations_to_lint=expectations_to_lint)
 
         # Check that the expectation is for BUG_DUMMY SKIP : ... [ Pass ]
-        self.assertEquals(exp.get_modifiers('failures/expected/text.html'),
+        self.assertEqual(exp.get_modifiers('failures/expected/text.html'),
                           [TestExpectationParser.DUMMY_BUG_MODIFIER, TestExpectationParser.SKIP_MODIFIER, TestExpectationParser.WONTFIX_MODIFIER])
-        self.assertEquals(exp.get_expectations('failures/expected/text.html'), set([PASS]))
+        self.assertEqual(exp.get_expectations('failures/expected/text.html'), set([PASS]))
 
     def test_skipped_tests_work(self):
         self.check(expectations='', overrides=None, skips=['failures/expected/text.html'])
@@ -317,13 +317,13 @@ class ExpectationSyntaxTests(Base):
         filename = 'TestExpectations'
         line_number = 1
         expectation_line = TestExpectationParser._tokenize_line(filename, line, line_number)
-        self.assertEquals(expectation_line.warnings, warnings)
-        self.assertEquals(expectation_line.name, name)
-        self.assertEquals(expectation_line.filename, filename)
-        self.assertEquals(expectation_line.line_number, line_number)
+        self.assertEqual(expectation_line.warnings, warnings)
+        self.assertEqual(expectation_line.name, name)
+        self.assertEqual(expectation_line.filename, filename)
+        self.assertEqual(expectation_line.line_number, line_number)
         if not warnings:
-            self.assertEquals(expectation_line.modifiers, modifiers)
-            self.assertEquals(expectation_line.expectations, expectations)
+            self.assertEqual(expectation_line.modifiers, modifiers)
+            self.assertEqual(expectation_line.expectations, expectations)
 
     def test_bare_name(self):
         self.assert_tokenize_exp('foo.html', modifiers=['SKIP'], expectations=['PASS'])
@@ -378,7 +378,7 @@ class SemanticTests(Base):
             self.parse_exp('BUG1234 failures/expected/text.html [ Failure ]', is_lint_mode=True)
             self.fail('should have raised an error about a bad bug identifier')
         except ParseError, exp:
-            self.assertEquals(len(exp.warnings), 1)
+            self.assertEqual(len(exp.warnings), 1)
 
     def test_missing_bugid(self):
         self.parse_exp('failures/expected/text.html [ Failure ]')
@@ -389,7 +389,7 @@ class SemanticTests(Base):
         self.parse_exp('failures/expected/text.html [ Failure ]')
         line = self._exp._model.get_expectation_line('failures/expected/text.html')
         self.assertFalse(line.is_invalid())
-        self.assertEquals(line.warnings, ['Test lacks BUG modifier.'])
+        self.assertEqual(line.warnings, ['Test lacks BUG modifier.'])
 
     def test_skip_and_wontfix(self):
         # Skip and WontFix are not allowed to have other expectations as well, because those
@@ -692,9 +692,9 @@ class TestExpectationSerializationTests(unittest.TestCase):
         add_line(set([TestConfiguration('xp', 'x86', 'release')]), True)
         add_line(set([TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'debug')]), False)
         serialized = TestExpectations.list_to_string(lines, self._converter)
-        self.assertEquals(serialized, "Bug(x) [ XP Release ] Yay [ ImageOnlyFailure ]\nBug(x) [ XP ] Yay [ ImageOnlyFailure ]")
+        self.assertEqual(serialized, "Bug(x) [ XP Release ] Yay [ ImageOnlyFailure ]\nBug(x) [ XP ] Yay [ ImageOnlyFailure ]")
         serialized = TestExpectations.list_to_string(lines, self._converter, reconstitute_only_these=reconstitute_only_these)
-        self.assertEquals(serialized, "Bug(x) [ XP Release ] Yay [ ImageOnlyFailure ]\nNay")
+        self.assertEqual(serialized, "Bug(x) [ XP Release ] Yay [ ImageOnlyFailure ]\nNay")
 
     def test_string_whitespace_stripping(self):
         self.assert_round_trip('\n', '')
index 1c8f029..74ef8cb 100644 (file)
@@ -69,5 +69,5 @@ class TestFailuresTest(unittest.TestCase):
         self.assertEqual(len(crash_set), 2)
 
     def test_crashes(self):
-        self.assertEquals(FailureCrash().message(), 'DumpRenderTree crashed')
-        self.assertEquals(FailureCrash(process_name='foo', pid=1234).message(), 'foo crashed [pid=1234]')
+        self.assertEqual(FailureCrash().message(), 'DumpRenderTree crashed')
+        self.assertEqual(FailureCrash(process_name='foo', pid=1234).message(), 'foo crashed [pid=1234]')
index 1fe75cc..753d474 100644 (file)
@@ -268,7 +268,7 @@ class PortTest(unittest.TestCase):
         port = self.make_port(port_name='foo')
         port.expectations_files = lambda: ['/mock-checkout/LayoutTests/platform/exists/TestExpectations', '/mock-checkout/LayoutTests/platform/nonexistant/TestExpectations']
         port._filesystem.write_text_file('/mock-checkout/LayoutTests/platform/exists/TestExpectations', '')
-        self.assertEquals('\n'.join(port.expectations_dict().keys()), '/mock-checkout/LayoutTests/platform/exists/TestExpectations')
+        self.assertEqual('\n'.join(port.expectations_dict().keys()), '/mock-checkout/LayoutTests/platform/exists/TestExpectations')
 
     def test_additional_expectations(self):
         port = self.make_port(port_name='foo')
@@ -279,19 +279,19 @@ class PortTest(unittest.TestCase):
         port._filesystem.write_text_file(
             '/tmp/additional-expectations-2.txt', 'content2\n')
 
-        self.assertEquals('\n'.join(port.expectations_dict().values()), '')
+        self.assertEqual('\n'.join(port.expectations_dict().values()), '')
 
         port._options.additional_expectations = [
             '/tmp/additional-expectations-1.txt']
-        self.assertEquals('\n'.join(port.expectations_dict().values()), '\ncontent1\n')
+        self.assertEqual('\n'.join(port.expectations_dict().values()), '\ncontent1\n')
 
         port._options.additional_expectations = [
             '/tmp/nonexistent-file', '/tmp/additional-expectations-1.txt']
-        self.assertEquals('\n'.join(port.expectations_dict().values()), '\ncontent1\n')
+        self.assertEqual('\n'.join(port.expectations_dict().values()), '\ncontent1\n')
 
         port._options.additional_expectations = [
             '/tmp/additional-expectations-1.txt', '/tmp/additional-expectations-2.txt']
-        self.assertEquals('\n'.join(port.expectations_dict().values()), '\ncontent1\n\ncontent2\n')
+        self.assertEqual('\n'.join(port.expectations_dict().values()), '\ncontent1\n\ncontent2\n')
 
     def test_additional_env_var(self):
         port = self.make_port(options=optparse.Values({'additional_env_var': ['FOO=BAR', 'BAR=FOO']}))
index 1550df4..74320f2 100644 (file)
@@ -38,7 +38,7 @@ class BuildersTest(unittest.TestCase):
             '(.) ': '____',
         }
         for name, expected in tests.items():
-            self.assertEquals(expected, builders.builder_path_from_name(name))
+            self.assertEqual(expected, builders.builder_path_from_name(name))
 
 if __name__ == '__main__':
     unittest.main()
index fce69c6..856ac31 100644 (file)
@@ -119,11 +119,11 @@ class ChromiumAndroidPortTest(chromium_port_testcase.ChromiumPortTestCase):
 
     def test_attributes(self):
         port = self.make_port()
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-android'))
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-android'))
 
     def test_default_timeout_ms(self):
-        self.assertEquals(self.make_port(options=optparse.Values({'configuration': 'Release'})).default_timeout_ms(), 10000)
-        self.assertEquals(self.make_port(options=optparse.Values({'configuration': 'Debug'})).default_timeout_ms(), 10000)
+        self.assertEqual(self.make_port(options=optparse.Values({'configuration': 'Release'})).default_timeout_ms(), 10000)
+        self.assertEqual(self.make_port(options=optparse.Values({'configuration': 'Debug'})).default_timeout_ms(), 10000)
 
     def test_expectations_files(self):
         # FIXME: override this test temporarily while we're still upstreaming the android port and
@@ -138,14 +138,14 @@ class ChromiumAndroidPortTest(chromium_port_testcase.ChromiumPortTestCase):
     def test_get_devices_one_device(self):
         port = self.make_port()
         self.mock_run_command.mock_one_device()
-        self.assertEquals(self.mock_run_command._mock_devices, port._get_devices())
-        self.assertEquals(1, port.default_child_processes())
+        self.assertEqual(self.mock_run_command._mock_devices, port._get_devices())
+        self.assertEqual(1, port.default_child_processes())
 
     def test_get_devices_two_devices(self):
         port = self.make_port()
         self.mock_run_command.mock_two_devices()
-        self.assertEquals(self.mock_run_command._mock_devices, port._get_devices())
-        self.assertEquals(2, port.default_child_processes())
+        self.assertEqual(self.mock_run_command._mock_devices, port._get_devices())
+        self.assertEqual(2, port.default_child_processes())
 
     def test_get_device_serial_no_device(self):
         port = self.make_port()
@@ -155,19 +155,19 @@ class ChromiumAndroidPortTest(chromium_port_testcase.ChromiumPortTestCase):
     def test_get_device_serial_one_device(self):
         port = self.make_port()
         self.mock_run_command.mock_one_device()
-        self.assertEquals(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
+        self.assertEqual(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
         self.assertRaises(AssertionError, port._get_device_serial, 1)
 
     def test_get_device_serial_two_devices(self):
         port = self.make_port()
         self.mock_run_command.mock_two_devices()
-        self.assertEquals(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
-        self.assertEquals(self.mock_run_command._mock_devices[1], port._get_device_serial(1))
+        self.assertEqual(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
+        self.assertEqual(self.mock_run_command._mock_devices[1], port._get_device_serial(1))
         self.assertRaises(AssertionError, port._get_device_serial, 2)
 
     def test_must_require_http_server(self):
         port = self.make_port()
-        self.assertEquals(port.requires_http_server(), True)
+        self.assertEqual(port.requires_http_server(), True)
 
 
 class ChromiumAndroidDriverTest(unittest.TestCase):
@@ -181,13 +181,13 @@ class ChromiumAndroidDriverTest(unittest.TestCase):
 
     def test_get_last_stacktrace(self):
         self.mock_run_command.mock_no_tombstone_dir()
-        self.assertEquals(self.driver._get_last_stacktrace(), '')
+        self.assertEqual(self.driver._get_last_stacktrace(), '')
 
         self.mock_run_command.mock_no_tombstone_file()
-        self.assertEquals(self.driver._get_last_stacktrace(), '')
+        self.assertEqual(self.driver._get_last_stacktrace(), '')
 
         self.mock_run_command.mock_ten_tombstones()
-        self.assertEquals(self.driver._get_last_stacktrace(),
+        self.assertEqual(self.driver._get_last_stacktrace(),
                           '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
                           '/data/tombstones/tombstone_03\nmock_contents\n')
 
@@ -196,7 +196,7 @@ class ChromiumAndroidDriverTest(unittest.TestCase):
         self.mock_run_command.mock_ten_tombstones()
         self.driver._crashed_process_name = 'foo'
         self.driver._crashed_pid = 1234
-        self.assertEquals(self.driver._get_crash_log('out bar\nout baz\n', 'err bar\nerr baz\n', newer_than=None),
+        self.assertEqual(self.driver._get_crash_log('out bar\nout baz\n', 'err bar\nerr baz\n', newer_than=None),
             ('err bar\n'
              'err baz\n'
              '********* [123456789ABCDEF0] Tombstone file:\n'
@@ -217,7 +217,7 @@ class ChromiumAndroidDriverTest(unittest.TestCase):
 
         self.driver._crashed_process_name = None
         self.driver._crashed_pid = None
-        self.assertEquals(self.driver._get_crash_log(None, None, newer_than=None),
+        self.assertEqual(self.driver._get_crash_log(None, None, newer_than=None),
             ('********* [123456789ABCDEF0] Tombstone file:\n'
              '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
              '/data/tombstones/tombstone_03\n'
@@ -232,7 +232,7 @@ class ChromiumAndroidDriverTest(unittest.TestCase):
 
     def test_cmd_line(self):
         cmd_line = self.driver.cmd_line(True, ['anything'])
-        self.assertEquals(['adb', '-s', self.mock_run_command._mock_devices[0], 'shell'], cmd_line)
+        self.assertEqual(['adb', '-s', self.mock_run_command._mock_devices[0], 'shell'], cmd_line)
 
     def test_drt_cmd_line(self):
         cmd_line = self.driver._drt_cmd_line(True, ['--a'])
@@ -242,19 +242,19 @@ class ChromiumAndroidDriverTest(unittest.TestCase):
 
     def test_read_prompt(self):
         self.driver._server_process = driver_unittest.MockServerProcess(lines=['root@android:/ # '])
-        self.assertEquals(self.driver._read_prompt(time.time() + 1), None)
+        self.assertEqual(self.driver._read_prompt(time.time() + 1), None)
         self.driver._server_process = driver_unittest.MockServerProcess(lines=['$ '])
-        self.assertEquals(self.driver._read_prompt(time.time() + 1), None)
+        self.assertEqual(self.driver._read_prompt(time.time() + 1), None)
 
     def test_command_from_driver_input(self):
         driver_input = driver.DriverInput('foo/bar/test.html', 10, 'checksum', True)
         expected_command = "/data/local/tmp/third_party/WebKit/LayoutTests/foo/bar/test.html'--pixel-test'checksum\n"
         if (sys.platform != "cygwin"):
-            self.assertEquals(self.driver._command_from_driver_input(driver_input), expected_command)
+            self.assertEqual(self.driver._command_from_driver_input(driver_input), expected_command)
 
         driver_input = driver.DriverInput('http/tests/foo/bar/test.html', 10, 'checksum', True)
         expected_command = "http://127.0.0.1:8000/foo/bar/test.html'--pixel-test'checksum\n"
-        self.assertEquals(self.driver._command_from_driver_input(driver_input), expected_command)
+        self.assertEqual(self.driver._command_from_driver_input(driver_input), expected_command)
 
 
 class ChromiumAndroidDriverTwoDriversTest(unittest.TestCase):
@@ -268,10 +268,10 @@ class ChromiumAndroidDriverTwoDriversTest(unittest.TestCase):
         driver1 = chromium_android.ChromiumAndroidDriver(port, worker_number=1, pixel_tests=True)
 
         cmd_line0 = driver0.cmd_line(True, ['anything'])
-        self.assertEquals(['adb', '-s', mock_run_command._mock_devices[0], 'shell'], cmd_line0)
+        self.assertEqual(['adb', '-s', mock_run_command._mock_devices[0], 'shell'], cmd_line0)
 
         cmd_line1 = driver1.cmd_line(True, ['anything'])
-        self.assertEquals(['adb', '-s', mock_run_command._mock_devices[1], 'shell'], cmd_line1)
+        self.assertEqual(['adb', '-s', mock_run_command._mock_devices[1], 'shell'], cmd_line1)
 
 
 class ChromiumAndroidTwoPortsTest(unittest.TestCase):
@@ -286,8 +286,8 @@ class ChromiumAndroidTwoPortsTest(unittest.TestCase):
                 MockSystemHost(executive=MockExecutive2(run_command_fn=mock_run_command.mock_run_command_fn)),
                 'chromium-android', options=options)
         cmd_line = port1.driver_cmd_line()
-        self.assertEquals(cmd_line.count('--encode-binary'), 1)
-        self.assertEquals(cmd_line.count('--enable-hardware-gpu'), 1)
+        self.assertEqual(cmd_line.count('--encode-binary'), 1)
+        self.assertEqual(cmd_line.count('--enable-hardware-gpu'), 1)
 
 
 if __name__ == '__main__':
index 169c2f4..4160034 100644 (file)
@@ -47,7 +47,7 @@ class ChromiumLinuxPortTest(chromium_port_testcase.ChromiumPortTestCase):
             host.executive = executive_mock.MockExecutive2(file_output)
 
         port = self.make_port(host, port_name=port_name)
-        self.assertEquals(port.architecture(), expected_architecture)
+        self.assertEqual(port.architecture(), expected_architecture)
         if expected_architecture == 'x86':
             self.assertTrue(port.baseline_path().endswith('chromium-linux-x86'))
             self.assertTrue(port.baseline_search_path()[0].endswith('chromium-linux-x86'))
@@ -74,14 +74,14 @@ class ChromiumLinuxPortTest(chromium_port_testcase.ChromiumPortTestCase):
     def test_determine_architecture_fails(self):
         # Test that we default to 'x86' if the driver doesn't exist.
         port = self.make_port()
-        self.assertEquals(port.architecture(), 'x86_64')
+        self.assertEqual(port.architecture(), 'x86_64')
 
         # Test that we default to 'x86' on an unknown architecture.
         host = MockSystemHost()
         host.filesystem.exists = lambda x: True
         host.executive = executive_mock.MockExecutive2('win32')
         port = self.make_port(host=host)
-        self.assertEquals(port.architecture(), 'x86_64')
+        self.assertEqual(port.architecture(), 'x86_64')
 
         # Test that we raise errors if something weird happens.
         host.executive = executive_mock.MockExecutive2(exception=AssertionError)
@@ -112,7 +112,7 @@ class ChromiumLinuxPortTest(chromium_port_testcase.ChromiumPortTestCase):
         self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver'))
 
     def test_path_to_image_diff(self):
-        self.assertEquals(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
+        self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
 
 if __name__ == '__main__':
     port_testcase.main()
index 7b924b6..d10326f 100644 (file)
@@ -41,7 +41,7 @@ class ChromiumMacPortTest(chromium_port_testcase.ChromiumPortTestCase):
 
     def assert_name(self, port_name, os_version_string, expected):
         port = self.make_port(os_version=os_version_string, port_name=port_name)
-        self.assertEquals(expected, port.name())
+        self.assertEqual(expected, port.name())
 
     def test_versions(self):
         self.assertTrue(self.make_port().name() in ('chromium-mac-snowleopard', 'chromium-mac-lion', 'chromium-mac-mountainlion', 'chromium-mac-future'))
@@ -64,16 +64,16 @@ class ChromiumMacPortTest(chromium_port_testcase.ChromiumPortTestCase):
 
     def test_baseline_path(self):
         port = self.make_port(port_name='chromium-mac-snowleopard')
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-mac-snowleopard'))
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac-snowleopard'))
 
         port = self.make_port(port_name='chromium-mac-lion')
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-mac-lion'))
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac-lion'))
 
         port = self.make_port(port_name='chromium-mac-mountainlion')
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
 
         port = self.make_port(port_name='chromium-mac-future')
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
 
     def test_operating_system(self):
         self.assertEqual('mac', self.make_port().operating_system())
@@ -100,7 +100,7 @@ class ChromiumMacPortTest(chromium_port_testcase.ChromiumPortTestCase):
         self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver'))
 
     def test_path_to_image_diff(self):
-        self.assertEquals(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
+        self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
 
 
 if __name__ == '__main__':
index 907eb07..dc5706b 100644 (file)
@@ -51,16 +51,16 @@ class ChromiumPortTestCase(port_testcase.PortTestCase):
     def test_default_max_locked_shards(self):
         port = self.make_port()
         port.default_child_processes = lambda: 16
-        self.assertEquals(port.default_max_locked_shards(), 4)
+        self.assertEqual(port.default_max_locked_shards(), 4)
         port.default_child_processes = lambda: 2
-        self.assertEquals(port.default_max_locked_shards(), 1)
+        self.assertEqual(port.default_max_locked_shards(), 1)
 
     def test_default_timeout_ms(self):
-        self.assertEquals(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
-        self.assertEquals(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
+        self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
+        self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
 
     def test_default_pixel_tests(self):
-        self.assertEquals(self.make_port().default_pixel_tests(), True)
+        self.assertEqual(self.make_port().default_pixel_tests(), True)
 
     def test_missing_symbol_to_skipped_tests(self):
         # Test that we get the chromium skips and not the webkit default skips
@@ -72,7 +72,7 @@ class ChromiumPortTestCase(port_testcase.PortTestCase):
     def test_all_test_configurations(self):
         """Validate the complete set of configurations this port knows about."""
         port = self.make_port()
-        self.assertEquals(set(port.all_test_configurations()), set([
+        self.assertEqual(set(port.all_test_configurations()), set([
             TestConfiguration('icecreamsandwich', 'x86', 'debug'),
             TestConfiguration('icecreamsandwich', 'x86', 'release'),
             TestConfiguration('snowleopard', 'x86', 'debug'),
@@ -130,12 +130,12 @@ class ChromiumPortTestCase(port_testcase.PortTestCase):
     def test_default_configuration(self):
         mock_options = MockOptions()
         port = ChromiumPortTestCase.TestLinuxPort(options=mock_options)
-        self.assertEquals(mock_options.configuration, 'default')  # pylint: disable-msg=E1101
+        self.assertEqual(mock_options.configuration, 'default')  # pylint: disable-msg=E1101
         self.assertTrue(port.default_configuration_called)
 
         mock_options = MockOptions(configuration=None)
         port = ChromiumPortTestCase.TestLinuxPort(mock_options)
-        self.assertEquals(mock_options.configuration, 'default')  # pylint: disable-msg=E1101
+        self.assertEqual(mock_options.configuration, 'default')  # pylint: disable-msg=E1101
         self.assertTrue(port.default_configuration_called)
 
     def test_diff_image(self):
@@ -152,11 +152,11 @@ class ChromiumPortTestCase(port_testcase.PortTestCase):
 
         # Images are different.
         port._executive = MockExecutive2(run_command_fn=mock_run_command)
-        self.assertEquals(mock_image_diff, port.diff_image("EXPECTED", "ACTUAL")[0])
+        self.assertEqual(mock_image_diff, port.diff_image("EXPECTED", "ACTUAL")[0])
 
         # Images are the same.
         port._executive = MockExecutive2(exit_code=0)
-        self.assertEquals(None, port.diff_image("EXPECTED", "ACTUAL")[0])
+        self.assertEqual(None, port.diff_image("EXPECTED", "ACTUAL")[0])
 
         # There was some error running image_diff.
         port._executive = MockExecutive2(exit_code=2)
@@ -170,7 +170,7 @@ class ChromiumPortTestCase(port_testcase.PortTestCase):
     def test_diff_image_crashed(self):
         port = ChromiumPortTestCase.TestLinuxPort()
         port._executive = MockExecutive2(exit_code=2)
-        self.assertEquals(port.diff_image("EXPECTED", "ACTUAL"), (None, 0, 'image diff returned an exit code of 2'))
+        self.assertEqual(port.diff_image("EXPECTED", "ACTUAL"), (None, 0, 'image diff returned an exit code of 2'))
 
     def test_expectations_files(self):
         port = self.make_port()
@@ -185,15 +185,15 @@ class ChromiumPortTestCase(port_testcase.PortTestCase):
         port._filesystem.write_text_file(skia_overrides_path, 'dummay text')
 
         port._options.builder_name = 'DUMMY_BUILDER_NAME'
-        self.assertEquals(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
+        self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
 
         port._options.builder_name = 'builder (deps)'
-        self.assertEquals(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
+        self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
 
         # A builder which does NOT observe the Chromium test_expectations,
         # but still observes the Skia test_expectations...
         port._options.builder_name = 'builder'
-        self.assertEquals(port.expectations_files(), [expectations_path, skia_overrides_path])
+        self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path])
 
     def test_expectations_ordering(self):
         # since we don't implement self.port_name in ChromiumPort.
index dc184fc..1c0ddc1 100644 (file)
@@ -59,7 +59,7 @@ class ChromiumWinTest(chromium_port_testcase.ChromiumPortTestCase):
     def test_setup_environ_for_server_cygpath(self):
         port = self.make_port()
         env = port.setup_environ_for_server(port.driver_name())
-        self.assertEquals(env['CYGWIN_PATH'], '/mock-checkout/Source/WebKit/chromium/third_party/cygwin/bin')
+        self.assertEqual(env['CYGWIN_PATH'], '/mock-checkout/Source/WebKit/chromium/third_party/cygwin/bin')
 
     def test_setup_environ_for_server_register_cygwin(self):
         port = self.make_port(options=MockOptions(register_cygwin=True, results_directory='/'))
@@ -70,7 +70,7 @@ class ChromiumWinTest(chromium_port_testcase.ChromiumPortTestCase):
 
     def assert_name(self, port_name, os_version_string, expected):
         port = self.make_port(port_name=port_name, os_version=os_version_string)
-        self.assertEquals(expected, port.name())
+        self.assertEqual(expected, port.name())
 
     def test_versions(self):
         port = self.make_port()
@@ -92,10 +92,10 @@ class ChromiumWinTest(chromium_port_testcase.ChromiumPortTestCase):
 
     def test_baseline_path(self):
         port = self.make_port(port_name='chromium-win-xp')
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-win-xp'))
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-win-xp'))
 
         port = self.make_port(port_name='chromium-win-win7')
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-win'))
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-win'))
 
     def test_build_path(self):
         # Test that optional paths are used regardless of whether they exist.
@@ -122,4 +122,4 @@ class ChromiumWinTest(chromium_port_testcase.ChromiumPortTestCase):
         self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver.exe'))
 
     def test_path_to_image_diff(self):
-        self.assertEquals(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff.exe')
+        self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff.exe')
index 5b11ade..a2d0927 100644 (file)
@@ -119,9 +119,9 @@ class DriverTest(unittest.TestCase):
             "#EOF",
         ])
         content_block = driver._read_block(0)
-        self.assertEquals(content_block.content_type, 'my_type')
-        self.assertEquals(content_block.encoding, 'none')
-        self.assertEquals(content_block.content_hash, 'foobar')
+        self.assertEqual(content_block.content_type, 'my_type')
+        self.assertEqual(content_block.encoding, 'none')
+        self.assertEqual(content_block.content_hash, 'foobar')
         driver._server_process = None
 
     def test_read_binary_block(self):
@@ -136,10 +136,10 @@ class DriverTest(unittest.TestCase):
             "#EOF",
         ])
         content_block = driver._read_block(0)
-        self.assertEquals(content_block.content_type, 'image/png')
-        self.assertEquals(content_block.content_hash, 'actual')
-        self.assertEquals(content_block.content, '12345678\n')
-        self.assertEquals(content_block.decoded_content, '12345678\n')
+        self.assertEqual(content_block.content_type, 'image/png')
+        self.assertEqual(content_block.content_hash, 'actual')
+        self.assertEqual(content_block.content, '12345678\n')
+        self.assertEqual(content_block.decoded_content, '12345678\n')
         driver._server_process = None
 
     def test_read_base64_block(self):
@@ -154,16 +154,16 @@ class DriverTest(unittest.TestCase):
             'MTIzNDU2NzgK#EOF',
         ])
         content_block = driver._read_block(0)
-        self.assertEquals(content_block.content_type, 'image/png')
-        self.assertEquals(content_block.content_hash, 'actual')
-        self.assertEquals(content_block.encoding, 'base64')
-        self.assertEquals(content_block.content, 'MTIzNDU2NzgK')
-        self.assertEquals(content_block.decoded_content, '12345678\n')
+        self.assertEqual(content_block.content_type, 'image/png')
+        self.assertEqual(content_block.content_hash, 'actual')
+        self.assertEqual(content_block.encoding, 'base64')
+        self.assertEqual(content_block.content, 'MTIzNDU2NzgK')
+        self.assertEqual(content_block.decoded_content, '12345678\n')
 
     def test_no_timeout(self):
         port = TestWebKitPort()
         driver = Driver(port, 0, pixel_tests=True, no_timeout=True)
-        self.assertEquals(driver.cmd_line(True, []), ['/mock-build/DumpRenderTree', '--no-timeout', '-'])
+        self.assertEqual(driver.cmd_line(True, []), ['/mock-build/DumpRenderTree', '--no-timeout', '-'])
 
     def test_check_for_driver_crash(self):
         port = TestWebKitPort()
@@ -186,10 +186,10 @@ class DriverTest(unittest.TestCase):
                 pass
 
         def assert_crash(driver, error_line, crashed, name, pid, unresponsive=False):
-            self.assertEquals(driver._check_for_driver_crash(error_line), crashed)
-            self.assertEquals(driver._crashed_process_name, name)
-            self.assertEquals(driver._crashed_pid, pid)
-            self.assertEquals(driver._subprocess_was_unresponsive, unresponsive)
+            self.assertEqual(driver._check_for_driver_crash(error_line), crashed)
+            self.assertEqual(driver._crashed_process_name, name)
+            self.assertEqual(driver._crashed_pid, pid)
+            self.assertEqual(driver._subprocess_was_unresponsive, unresponsive)
             driver.stop()
 
         driver._server_process = FakeServerProcess(False)
@@ -234,8 +234,8 @@ class DriverTest(unittest.TestCase):
     def test_creating_a_port_does_not_write_to_the_filesystem(self):
         port = TestWebKitPort()
         driver = Driver(port, 0, pixel_tests=True)
-        self.assertEquals(port._filesystem.written_files, {})
-        self.assertEquals(port._filesystem.last_tmpdir, None)
+        self.assertEqual(port._filesystem.written_files, {})
+        self.assertEqual(port._filesystem.last_tmpdir, None)
 
     def test_stop_cleans_up_properly(self):
         port = TestWebKitPort()
index 2980c2d..915c17d 100644 (file)
@@ -105,7 +105,7 @@ class FactoryTest(unittest.TestCase):
         self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHost(os_name='vms')).get)
 
     def test_get_from_builder_name(self):
-        self.assertEquals(factory.PortFactory(MockSystemHost()).get_from_builder_name('WebKit Mac10.7').name(),
+        self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_name('WebKit Mac10.7').name(),
                           'chromium-mac-lion')
 
 
index f1df6bf..6f5fae6 100644 (file)
@@ -50,10 +50,10 @@ class GtkPortTest(port_testcase.PortTestCase):
         OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_stderr=expected_stderr)
 
     def test_default_timeout_ms(self):
-        self.assertEquals(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
-        self.assertEquals(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
-        self.assertEquals(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Debug')).default_timeout_ms(), 80000)
-        self.assertEquals(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Release')).default_timeout_ms(), 80000)
+        self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
+        self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
+        self.assertEqual(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Debug')).default_timeout_ms(), 80000)
+        self.assertEqual(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Release')).default_timeout_ms(), 80000)
 
     def assertLinesEqual(self, a, b):
         if hasattr(self, 'assertMultiLineEqual'):
index fbf2d9d..650a767 100644 (file)
@@ -88,7 +88,7 @@ class HttpLockTest(unittest.TestCase):
         # FIXME: Once Executive wraps getpid, we can mock this and not use a real pid.
         current_pid = os.getpid()
         self.http_lock._filesystem.write_text_file(self.lock_file_name, str(current_pid))
-        self.assertEquals(self.http_lock._current_lock_pid(), current_pid)
+        self.assertEqual(self.http_lock._current_lock_pid(), current_pid)
 
     def test_extract_lock_number(self):
         lock_file_list = (
index 46cc98a..0e5f0a0 100755 (executable)
@@ -49,9 +49,9 @@ class TestImageDiffer(unittest.TestCase):
     def test_diff_image_failed(self):
         port = FakePort(['diff: 100% failed\n'])
         image_differ = ImageDiffer(port)
-        self.assertEquals(image_differ.diff_image('foo', 'bar', 0.1), ('', 100.0, None))
+        self.assertEqual(image_differ.diff_image('foo', 'bar', 0.1), ('', 100.0, None))
 
     def test_diff_image_passed(self):
         port = FakePort(['diff: 0% passed\n'])
         image_differ = ImageDiffer(port)
-        self.assertEquals(image_differ.diff_image('foo', 'bar', 0.1), (None, 0, None))
+        self.assertEqual(image_differ.diff_image('foo', 'bar', 0.1), (None, 0, None))
index 7628bb7..09d37d7 100644 (file)
@@ -51,7 +51,7 @@ class LeakDetectorTest(unittest.TestCase):
         detector._callstacks_to_exclude_from_leaks = lambda: ['foo bar', 'BAZ']
         detector._types_to_exlude_from_leaks = lambda: ['abcdefg', 'hi jklmno']
         expected_args = ['--exclude-callstack=foo bar', '--exclude-callstack=BAZ', '--exclude-type=abcdefg', '--exclude-type=hi jklmno', 1234]
-        self.assertEquals(detector._leaks_args(1234), expected_args)
+        self.assertEqual(detector._leaks_args(1234), expected_args)
 
     example_leaks_output = """Process 5122: 663744 nodes malloced for 78683 KB
 Process 5122: 337301 leaks for 6525216 total leaked bytes.
@@ -110,18 +110,18 @@ Binary Images:
 """
 
     def test_parse_leaks_output(self):
-        self.assertEquals(self._make_detector()._parse_leaks_output(self.example_leaks_output), (337301, 0, 6525216))
-        self.assertEquals(self._make_detector()._parse_leaks_output(self.example_leaks_output_with_exclusions), (282, 17, 21920))
+        self.assertEqual(self._make_detector()._parse_leaks_output(self.example_leaks_output), (337301, 0, 6525216))
+        self.assertEqual(self._make_detector()._parse_leaks_output(self.example_leaks_output_with_exclusions), (282, 17, 21920))
 
     def test_leaks_files_in_directory(self):
         detector = self._make_detector()
-        self.assertEquals(detector.leaks_files_in_directory('/bogus-directory'), [])
+        self.assertEqual(detector.leaks_files_in_directory('/bogus-directory'), [])
         detector._filesystem = MockFileSystem({
             '/mock-results/DumpRenderTree-1234-leaks.txt': '',
             '/mock-results/DumpRenderTree-23423-leaks.txt': '',
             '/mock-results/DumpRenderTree-823-leaks.txt': '',
         })
-        self.assertEquals(len(detector.leaks_files_in_directory('/mock-results')), 3)
+        self.assertEqual(len(detector.leaks_files_in_directory('/mock-results')), 3)
 
     def test_count_total_bytes_and_unique_leaks(self):
         detector = self._make_detector()
@@ -138,7 +138,7 @@ total: 5,888 bytes (0 bytes excluded)."""
         leak_files = ['/mock-results/DumpRenderTree-1234-leaks.txt', '/mock-results/DumpRenderTree-1235-leaks.txt']
         expected_stdout = "MOCK _run_script: parse-malloc-history ['--merge-depth', 5, '/mock-results/DumpRenderTree-1234-leaks.txt', '/mock-results/DumpRenderTree-1235-leaks.txt']\n"
         results_tuple = OutputCapture().assert_outputs(self, detector.count_total_bytes_and_unique_leaks, [leak_files], expected_stdout=expected_stdout)
-        self.assertEquals(results_tuple, ("5,888 bytes", 2))
+        self.assertEqual(results_tuple, ("5,888 bytes", 2))
 
     def test_count_total_leaks(self):
         detector = self._make_detector()
@@ -149,4 +149,4 @@ total: 5,888 bytes (0 bytes excluded)."""
             '/mock-results/DumpRenderTree-823-leaks.txt': 'Process 12356: 23412 leaks for 18 total leaked bytes.\n',
         })
         leak_file_paths = ['/mock-results/DumpRenderTree-1234-leaks.txt', '/mock-results/DumpRenderTree-23423-leaks.txt', '/mock-results/DumpRenderTree-823-leaks.txt']
-        self.assertEquals(detector.count_total_leaks(leak_file_paths), 35765)
+        self.assertEqual(detector.count_total_leaks(leak_file_paths), 35765)
index c2b26b2..5112014 100644 (file)
@@ -47,7 +47,7 @@ class MacTest(port_testcase.PortTestCase):
 
     def test_default_timeout_ms(self):
         super(MacTest, self).test_default_timeout_ms()
-        self.assertEquals(self.make_port(options=MockOptions(guard_malloc=True)).default_timeout_ms(), 350000)
+        self.assertEqual(self.make_port(options=MockOptions(guard_malloc=True)).default_timeout_ms(), 350000)
 
 
     example_skipped_file = u"""
@@ -77,7 +77,7 @@ java/
     def assert_name(self, port_name, os_version_string, expected):
         host = MockSystemHost(os_name='mac', os_version=os_version_string)
         port = self.make_port(host=host, port_name=port_name)
-        self.assertEquals(expected, port.name())
+        self.assertEqual(expected, port.name())
 
     def test_tests_for_other_platforms(self):
         platforms = ['mac', 'chromium-linux', 'mac-snowleopard']
@@ -115,14 +115,14 @@ java/
     def test_setup_environ_for_server(self):
         port = self.make_port(options=MockOptions(leaks=True, guard_malloc=True))
         env = port.setup_environ_for_server(port.driver_name())
-        self.assertEquals(env['MallocStackLogging'], '1')
-        self.assertEquals(env['DYLD_INSERT_LIBRARIES'], '/usr/lib/libgmalloc.dylib')
+        self.assertEqual(env['MallocStackLogging'], '1')
+        self.assertEqual(env['DYLD_INSERT_LIBRARIES'], '/usr/lib/libgmalloc.dylib')
 
     def _assert_search_path(self, port_name, baseline_path, search_paths, use_webkit2=False):
         port = self.make_port(port_name=port_name, options=MockOptions(webkit_test_runner=use_webkit2))
         absolute_search_paths = map(port._webkit_baseline_path, search_paths)
-        self.assertEquals(port.baseline_path(), port._webkit_baseline_path(baseline_path))
-        self.assertEquals(port.baseline_search_path(), absolute_search_paths)
+        self.assertEqual(port.baseline_path(), port._webkit_baseline_path(baseline_path))
+        self.assertEqual(port.baseline_search_path(), absolute_search_paths)
 
     def test_baseline_search_path(self):
         # Note that we don't need total coverage here, just path coverage, since this is all data driven.
@@ -240,18 +240,18 @@ java/
             self.args = args
 
         port._run_script = run_script
-        self.assertEquals(port.architecture(), 'x86')
+        self.assertEqual(port.architecture(), 'x86')
         port._build_driver()
-        self.assertEquals(self.args, ['ARCHS=i386'])
+        self.assertEqual(self.args, ['ARCHS=i386'])
 
     def test_64bit(self):
         # Apple Mac port is 64-bit by default
         port = self.make_port()
-        self.assertEquals(port.architecture(), 'x86_64')
+        self.assertEqual(port.architecture(), 'x86_64')
 
         def run_script(script, args=None, env=None):
             self.args = args
 
         port._run_script = run_script
         port._build_driver()
-        self.assertEquals(self.args, [])
+        self.assertEqual(self.args, [])
index 1ac051a..c4c43f5 100755 (executable)
@@ -257,7 +257,7 @@ class MockTestShellTest(MockDRTTest):
                         '\n',
                         '#EOF\n'],
             host=host)
-        self.assertEquals(host.filesystem.written_files,
+        self.assertEqual(host.filesystem.written_files,
             {'/tmp/png_result0.png': 'image_checksum\x8a-pngtEXtchecksum\x00image_checksum-checksum'})
 
     def test_test_shell_parse_options(self):
@@ -265,4 +265,4 @@ class MockTestShellTest(MockDRTTest):
             '--pixel-tests=/tmp/png_result0.png'])
         self.assertTrue(options.test_shell)
         self.assertTrue(options.pixel_tests)
-        self.assertEquals(options.pixel_path, '/tmp/png_result0.png')
+        self.assertEqual(options.pixel_path, '/tmp/png_result0.png')
index b2bef7e..19ccbf6 100755 (executable)
@@ -94,16 +94,16 @@ class PortTestCase(unittest.TestCase):
     def test_default_max_locked_shards(self):
         port = self.make_port()
         port.default_child_processes = lambda: 16
-        self.assertEquals(port.default_max_locked_shards(), 1)
+        self.assertEqual(port.default_max_locked_shards(), 1)
         port.default_child_processes = lambda: 2
-        self.assertEquals(port.default_max_locked_shards(), 1)
+        self.assertEqual(port.default_max_locked_shards(), 1)
 
     def test_default_timeout_ms(self):
-        self.assertEquals(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 35000)
-        self.assertEquals(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 35000)
+        self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 35000)
+        self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 35000)
 
     def test_default_pixel_tests(self):
-        self.assertEquals(self.make_port().default_pixel_tests(), False)
+        self.assertEqual(self.make_port().default_pixel_tests(), False)
 
     def test_driver_cmd_line(self):
         port = self.make_port()
@@ -268,18 +268,18 @@ class PortTestCase(unittest.TestCase):
 
         port._server_process_constructor = make_proc
         port.setup_test_run()
-        self.assertEquals(port.diff_image('foo', 'bar'), ('', 100.0, None))
-        self.assertEquals(self.proc.cmd[1:3], ["--tolerance", "0.1"])
+        self.assertEqual(port.diff_image('foo', 'bar'), ('', 100.0, None))
+        self.assertEqual(self.proc.cmd[1:3], ["--tolerance", "0.1"])
 
-        self.assertEquals(port.diff_image('foo', 'bar', None), ('', 100.0, None))
-        self.assertEquals(self.proc.cmd[1:3], ["--tolerance", "0.1"])
+        self.assertEqual(port.diff_image('foo', 'bar', None), ('', 100.0, None))
+        self.assertEqual(self.proc.cmd[1:3], ["--tolerance", "0.1"])
 
-        self.assertEquals(port.diff_image('foo', 'bar', 0), ('', 100.0, None))
-        self.assertEquals(self.proc.cmd[1:3], ["--tolerance", "0"])
+        self.assertEqual(port.diff_image('foo', 'bar', 0), ('', 100.0, None))
+        self.assertEqual(self.proc.cmd[1:3], ["--tolerance", "0"])
 
         port.clean_up_test_run()
         self.assertTrue(self.proc.stopped)
-        self.assertEquals(port._image_differ, None)
+        self.assertEqual(port._image_differ, None)
 
     def test_diff_image_crashed(self):
         port = self.make_port()
@@ -291,7 +291,7 @@ class PortTestCase(unittest.TestCase):
 
         port._server_process_constructor = make_proc
         port.setup_test_run()
-        self.assertEquals(port.diff_image('foo', 'bar'), ('', 0, 'ImageDiff crashed\n'))
+        self.assertEqual(port.diff_image('foo', 'bar'), ('', 0, 'ImageDiff crashed\n'))
         port.clean_up_test_run()
 
     def test_check_wdiff(self):
@@ -387,13 +387,13 @@ class PortTestCase(unittest.TestCase):
 
     def test_get_crash_log(self):
         port = self.make_port()
-        self.assertEquals(port._get_crash_log(None, None, None, None, newer_than=None),
+        self.assertEqual(port._get_crash_log(None, None, None, None, newer_than=None),
            (None,
             'crash log for <unknown process name> (pid <unknown>):\n'
             'STDOUT: <empty>\n'
             'STDERR: <empty>\n'))
 
-        self.assertEquals(port._get_crash_log('foo', 1234, 'out bar\nout baz', 'err bar\nerr baz\n', newer_than=None),
+        self.assertEqual(port._get_crash_log('foo', 1234, 'out bar\nout baz', 'err bar\nerr baz\n', newer_than=None),
             ('err bar\nerr baz\n',
              'crash log for foo (pid 1234):\n'
              'STDOUT: out bar\n'
@@ -401,13 +401,13 @@ class PortTestCase(unittest.TestCase):
              'STDERR: err bar\n'
              'STDERR: err baz\n'))
 
-        self.assertEquals(port._get_crash_log('foo', 1234, 'foo\xa6bar', 'foo\xa6bar', newer_than=None),
+        self.assertEqual(port._get_crash_log('foo', 1234, 'foo\xa6bar', 'foo\xa6bar', newer_than=None),
             ('foo\xa6bar',
              u'crash log for foo (pid 1234):\n'
              u'STDOUT: foo\ufffdbar\n'
              u'STDERR: foo\ufffdbar\n'))
 
-        self.assertEquals(port._get_crash_log('foo', 1234, 'foo\xa6bar', 'foo\xa6bar', newer_than=1.0),
+        self.assertEqual(port._get_crash_log('foo', 1234, 'foo\xa6bar', 'foo\xa6bar', newer_than=1.0),
             ('foo\xa6bar',
              u'crash log for foo (pid 1234):\n'
              u'STDOUT: foo\ufffdbar\n'
@@ -417,14 +417,14 @@ class PortTestCase(unittest.TestCase):
         port = self.make_port(options=options)
         for directory in dirs:
             port.host.filesystem.maybe_make_directory(directory)
-        self.assertEquals(port._build_path(), expected_path)
+        self.assertEqual(port._build_path(), expected_path)
 
     def test_expectations_ordering(self):
         port = self.make_port()
         for path in port.expectations_files():
             port._filesystem.write_text_file(path, '')
         ordered_dict = port.expectations_dict()
-        self.assertEquals(port.path_to_test_expectations_file(), ordered_dict.keys()[0])
+        self.assertEqual(port.path_to_test_expectations_file(), ordered_dict.keys()[0])
 
         options = MockOptions(additional_expectations=['/tmp/foo', '/tmp/bar'])
         port = self.make_port(options=options)
@@ -433,8 +433,8 @@ class PortTestCase(unittest.TestCase):
         port._filesystem.write_text_file('/tmp/foo', 'foo')
         port._filesystem.write_text_file('/tmp/bar', 'bar')
         ordered_dict = port.expectations_dict()
-        self.assertEquals(ordered_dict.keys()[-2:], options.additional_expectations)  # pylint: disable-msg=E1101
-        self.assertEquals(ordered_dict.values()[-2:], ['foo', 'bar'])
+        self.assertEqual(ordered_dict.keys()[-2:], options.additional_expectations)  # pylint: disable-msg=E1101
+        self.assertEqual(ordered_dict.values()[-2:], ['foo', 'bar'])
 
     def test_path_to_test_expectations_file(self):
         port = TestWebKitPort()
@@ -560,7 +560,7 @@ class PortTestCase(unittest.TestCase):
         self.assertFalse(output.assert_outputs(self, port._build_driver, expected_stderr=expected_stderr, expected_logs=expected_logs))
 
     def _assert_config_file_for_platform(self, port, platform, config_file):
-        self.assertEquals(port._apache_config_file_name_for_platform(platform), config_file)
+        self.assertEqual(port._apache_config_file_name_for_platform(platform), config_file)
 
     def test_linux_distro_detection(self):
         port = TestWebKitPort()
@@ -602,19 +602,19 @@ class PortTestCase(unittest.TestCase):
             self.assertRaises(IOError, port._path_to_apache_config_file)
             port._filesystem.write_text_file('/existing/httpd.conf', 'Hello, world!')
             os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf'
-            self.assertEquals(port._path_to_apache_config_file(), '/existing/httpd.conf')
+            self.assertEqual(port._path_to_apache_config_file(), '/existing/httpd.conf')
         finally:
             os.environ = saved_environ.copy()
 
         # Mock out _apache_config_file_name_for_platform to ignore the passed sys.platform value.
         port._apache_config_file_name_for_platform = lambda platform: 'httpd.conf'
-        self.assertEquals(port._path_to_apache_config_file(), '/mock-checkout/LayoutTests/http/conf/httpd.conf')
+        self.assertEqual(port._path_to_apache_config_file(), '/mock-checkout/LayoutTests/http/conf/httpd.conf')
 
         # Check that even if we mock out _apache_config_file_name, the environment variable takes precedence.
         saved_environ = os.environ.copy()
         try:
             os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf'
-            self.assertEquals(port._path_to_apache_config_file(), '/existing/httpd.conf')
+            self.assertEqual(port._path_to_apache_config_file(), '/existing/httpd.conf')
         finally:
             os.environ = saved_environ.copy()
 
@@ -644,4 +644,4 @@ class PortTestCase(unittest.TestCase):
 
     def test_additional_platform_directory(self):
         port = self.make_port(options=MockOptions(additional_platform_directory=['/tmp/foo']))
-        self.assertEquals(port.baseline_search_path()[0], '/tmp/foo')
+        self.assertEqual(port.baseline_search_path()[0], '/tmp/foo')
index cf09bd8..4a558f8 100644 (file)
@@ -69,7 +69,7 @@ class QtPortTest(port_testcase.PortTestCase):
         port = self.make_port(host=host, qt_version=qt_version, port_name=port_name,
                               options=MockOptions(webkit_test_runner=use_webkit2, platform='qt'))
         absolute_search_paths = map(port._webkit_baseline_path, search_paths)
-        self.assertEquals(port.baseline_search_path(), absolute_search_paths)
+        self.assertEqual(port.baseline_search_path(), absolute_search_paths)
 
     def _assert_expectations_files(self, search_paths, os_name, use_webkit2=False, qt_version='4.8'):
         # FIXME: Port constructors should not "parse" the port name, but
@@ -80,7 +80,7 @@ class QtPortTest(port_testcase.PortTestCase):
         port_name = 'qt-' + os_name
         port = self.make_port(host=host, qt_version=qt_version, port_name=port_name,
                               options=MockOptions(webkit_test_runner=use_webkit2, platform='qt'))
-        self.assertEquals(port.expectations_files(), search_paths)
+        self.assertEqual(port.expectations_files(), search_paths)
 
     def _qt_version(self, qt_version):
         if qt_version in '4.8':
@@ -110,7 +110,7 @@ class QtPortTest(port_testcase.PortTestCase):
     def test_setup_environ_for_server(self):
         port = self.make_port()
         env = port.setup_environ_for_server(port.driver_name())
-        self.assertEquals(env['QTWEBKIT_PLUGIN_PATH'], '/mock-build/lib/plugins')
+        self.assertEqual(env['QTWEBKIT_PLUGIN_PATH'], '/mock-build/lib/plugins')
 
     def test_operating_system(self):
         self.assertEqual('linux', self.make_port(port_name='qt-linux', os_name='linux').operating_system())
index 7a5ac45..cd1db1f 100644 (file)
@@ -104,23 +104,23 @@ class TestServerProcess(unittest.TestCase):
         proc = server_process.ServerProcess(port, 'python', cmd)
         proc.write('')
 
-        self.assertEquals(proc.poll(), None)
+        self.assertEqual(proc.poll(), None)
         self.assertFalse(proc.has_crashed())
 
         # check that doing a read after an expired deadline returns
         # nothing immediately.
         line = proc.read_stdout_line(now - 1)
-        self.assertEquals(line, None)
+        self.assertEqual(line, None)
 
         # FIXME: This part appears to be flaky. line should always be non-None.
         # FIXME: https://bugs.webkit.org/show_bug.cgi?id=88280
         line = proc.read_stdout_line(now + 1.0)
         if line:
-            self.assertEquals(line.strip(), "stdout")
+            self.assertEqual(line.strip(), "stdout")
 
         line = proc.read_stderr_line(now + 1.0)
         if line:
-            self.assertEquals(line.strip(), "stderr")
+            self.assertEqual(line.strip(), "stderr")
 
         proc.stop(0)
 
@@ -141,12 +141,12 @@ class TestServerProcess(unittest.TestCase):
         server_process.write("should break")
         self.assertTrue(server_process.has_crashed())
         self.assertNotEquals(server_process.pid(), None)
-        self.assertEquals(server_process._proc, None)
-        self.assertEquals(server_process.broken_pipes, [server_process.stdin])
+        self.assertEqual(server_process._proc, None)
+        self.assertEqual(server_process.broken_pipes, [server_process.stdin])
 
         port_obj.host.platform.os_name = 'mac'
         server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
         server_process.write("should break")
         self.assertTrue(server_process.has_crashed())
-        self.assertEquals(server_process._proc, None)
-        self.assertEquals(server_process.broken_pipes, [server_process.stdin])
+        self.assertEqual(server_process._proc, None)
+        self.assertEqual(server_process.broken_pipes, [server_process.stdin])
index 930dcd8..2bafaab 100644 (file)
@@ -60,7 +60,7 @@ class WinPortTest(port_testcase.PortTestCase):
     def _assert_search_path(self, expected_search_paths, version, use_webkit2=False):
         port = self.make_port(port_name='win', os_version=version, options=MockOptions(webkit_test_runner=use_webkit2))
         absolute_search_paths = map(port._webkit_baseline_path, expected_search_paths)
-        self.assertEquals(port.baseline_search_path(), absolute_search_paths)
+        self.assertEqual(port.baseline_search_path(), absolute_search_paths)
 
     def test_baseline_search_path(self):
         self._assert_search_path(['win-xp', 'win-vista', 'win-7sp0', 'win', 'mac-lion', 'mac'], 'xp')
@@ -74,7 +74,7 @@ class WinPortTest(port_testcase.PortTestCase):
     def _assert_version(self, port_name, expected_version):
         host = MockSystemHost(os_name='win', os_version=expected_version)
         port = WinPort(host, port_name=port_name)
-        self.assertEquals(port.version(), expected_version)
+        self.assertEqual(port.version(), expected_version)
 
     def test_versions(self):
         self._assert_version('win-xp', 'xp')
@@ -100,10 +100,10 @@ class WinPortTest(port_testcase.PortTestCase):
         port = self.make_port()
         port._executive.run_command = lambda command, cwd=None, error_handler=None: "Nonsense"
         # runtime_features_list returns None when its results are meaningless (it couldn't run DRT or parse the output, etc.)
-        self.assertEquals(port._runtime_feature_list(), None)
+        self.assertEqual(port._runtime_feature_list(), None)
         port._executive.run_command = lambda command, cwd=None, error_handler=None: "SupportedFeatures:foo bar"
-        self.assertEquals(port._runtime_feature_list(), ['foo', 'bar'])
+        self.assertEqual(port._runtime_feature_list(), ['foo', 'bar'])
 
     def test_expectations_files(self):
-        self.assertEquals(len(self.make_port().expectations_files()), 2)
-        self.assertEquals(len(self.make_port(options=MockOptions(webkit_test_runner=True)).expectations_files()), 4)
+        self.assertEqual(len(self.make_port().expectations_files()), 2)
+        self.assertEqual(len(self.make_port(options=MockOptions(webkit_test_runner=True)).expectations_files()), 4)
index 6a9161f..de1a21c 100755 (executable)
@@ -242,12 +242,12 @@ class LintTest(unittest.TestCase, StreamTestingMixin):
                                                FakePort(host, 'b', 'path-to-b'),
                                                FakePort(host, 'b-win', 'path-to-b')))
 
-        self.assertEquals(run_webkit_tests.lint(host.port_factory.ports['a'], MockOptions(platform=None)), 0)
-        self.assertEquals(host.ports_parsed, ['a', 'b', 'b-win'])
+        self.assertEqual(run_webkit_tests.lint(host.port_factory.ports['a'], MockOptions(platform=None)), 0)
+        self.assertEqual(host.ports_parsed, ['a', 'b', 'b-win'])
 
         host.ports_parsed = []
-        self.assertEquals(run_webkit_tests.lint(host.port_factory.ports['a'], MockOptions(platform='a')), 0)
-        self.assertEquals(host.ports_parsed, ['a'])
+        self.assertEqual(run_webkit_tests.lint(host.port_factory.ports['a'], MockOptions(platform='a')), 0)
+        self.assertEqual(host.ports_parsed, ['a'])
 
     def test_lint_test_files(self):
         res, out, err, user = logging_run(['--lint-test-files'])
@@ -289,7 +289,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
 
     def test_all(self):
         res, out, err, user = logging_run([], tests_included=True)
-        self.assertEquals(res, unexpected_tests_count)
+        self.assertEqual(res, unexpected_tests_count)
 
     def test_basic(self):
         self.assertTrue(passing_run())
@@ -405,7 +405,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
     def test_repeat_each(self):
         tests_to_run = ['passes/image.html', 'passes/text.html']
         tests_run = get_tests_run(['--repeat-each', '2'] + tests_to_run, tests_included=True, flatten_batches=True)
-        self.assertEquals(tests_run, ['passes/image.html', 'passes/image.html', 'passes/text.html', 'passes/text.html'])
+        self.assertEqual(tests_run, ['passes/image.html', 'passes/image.html', 'passes/text.html', 'passes/text.html'])
 
     def test_ignore_flag(self):
         # Note that passes/image.html is expected to be run since we specified it directly.
@@ -419,26 +419,26 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         num_tests_run_by_default = len(tests_run)
 
         # Check that nothing changes when we specify skipped=default.
-        self.assertEquals(len(get_tests_run(['--skipped=default', 'passes'], tests_included=True, flatten_batches=True)),
+        self.assertEqual(len(get_tests_run(['--skipped=default', 'passes'], tests_included=True, flatten_batches=True)),
                           num_tests_run_by_default)
 
         # Now check that we run one more test (the skipped one).
         tests_run = get_tests_run(['--skipped=ignore', 'passes'], tests_included=True, flatten_batches=True)
         self.assertTrue('passes/skipped/skip.html' in tests_run)
-        self.assertEquals(len(tests_run), num_tests_run_by_default + 1)
+        self.assertEqual(len(tests_run), num_tests_run_by_default + 1)
 
         # Now check that we only run the skipped test.
-        self.assertEquals(get_tests_run(['--skipped=only', 'passes'], tests_included=True, flatten_batches=True),
+        self.assertEqual(get_tests_run(['--skipped=only', 'passes'], tests_included=True, flatten_batches=True),
                           ['passes/skipped/skip.html'])
 
         # Now check that we don't run anything.
-        self.assertEquals(get_tests_run(['--skipped=always', 'passes/skipped/skip.html'], tests_included=True, flatten_batches=True),
+        self.assertEqual(get_tests_run(['--skipped=always', 'passes/skipped/skip.html'], tests_included=True, flatten_batches=True),
                           [])
 
     def test_iterations(self):
         tests_to_run = ['passes/image.html', 'passes/text.html']
         tests_run = get_tests_run(['--iterations', '2'] + tests_to_run, tests_included=True, flatten_batches=True)
-        self.assertEquals(tests_run, ['passes/image.html', 'passes/text.html', 'passes/image.html', 'passes/text.html'])
+        self.assertEqual(tests_run, ['passes/image.html', 'passes/text.html', 'passes/image.html', 'passes/text.html'])
 
     def test_repeat_each_iterations_num_tests(self):
         # The total number of tests should be: number_of_tests *
@@ -456,12 +456,12 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         # Test that we actually select the right chunk
         all_tests_run = get_tests_run(flatten_batches=True)
         chunk_tests_run = get_tests_run(['--run-chunk', '1:4'], flatten_batches=True)
-        self.assertEquals(all_tests_run[4:8], chunk_tests_run)
+        self.assertEqual(all_tests_run[4:8], chunk_tests_run)
 
         # Test that we wrap around if the number of tests is not evenly divisible by the chunk size
         tests_to_run = ['passes/error.html', 'passes/image.html', 'passes/platform_image.html', 'passes/text.html']
         chunk_tests_run = get_tests_run(['--run-chunk', '1:3'] + tests_to_run, tests_included=True, flatten_batches=True)
-        self.assertEquals(['passes/text.html', 'passes/error.html', 'passes/image.html'], chunk_tests_run)
+        self.assertEqual(['passes/text.html', 'passes/error.html', 'passes/image.html'], chunk_tests_run)
 
     def test_run_force(self):
         # This raises an exception because we run
@@ -474,18 +474,18 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         # Test that we actually select the right part
         tests_to_run = ['passes/error.html', 'passes/image.html', 'passes/platform_image.html', 'passes/text.html']
         tests_run = get_tests_run(['--run-part', '1:2'] + tests_to_run, tests_included=True, flatten_batches=True)
-        self.assertEquals(['passes/error.html', 'passes/image.html'], tests_run)
+        self.assertEqual(['passes/error.html', 'passes/image.html'], tests_run)
 
         # Test that we wrap around if the number of tests is not evenly divisible by the chunk size
         # (here we end up with 3 parts, each with 2 tests, and we only have 4 tests total, so the
         # last part repeats the first two tests).
         chunk_tests_run = get_tests_run(['--run-part', '3:3'] + tests_to_run, tests_included=True, flatten_batches=True)
-        self.assertEquals(['passes/error.html', 'passes/image.html'], chunk_tests_run)
+        self.assertEqual(['passes/error.html', 'passes/image.html'], chunk_tests_run)
 
     def test_run_singly(self):
         batch_tests_run = get_tests_run(['--run-singly'])
         for batch in batch_tests_run:
-            self.assertEquals(len(batch), 1, '%s had too many tests' % ', '.join(batch))
+            self.assertEqual(len(batch), 1, '%s had too many tests' % ', '.join(batch))
 
     def test_skip_failing_tests(self):
         # This tests that we skip both known failing and known flaky tests. Because there are
@@ -503,28 +503,28 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
 
     def test_run_singly_actually_runs_tests(self):
         res, _, _, _ = logging_run(['--run-singly', 'failures/unexpected'])
-        self.assertEquals(res, unexpected_failures)
+        self.assertEqual(res, unexpected_failures)
 
     def test_single_file(self):
         # FIXME: We should consider replacing more of the get_tests_run()-style tests
         # with tests that read the tests_run* files, like this one.
         host = MockHost()
         tests_run = passing_run(['passes/text.html'], tests_included=True, host=host)
-        self.assertEquals(host.filesystem.read_text_file('/tmp/layout-test-results/tests_run0.txt'),
+        self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-results/tests_run0.txt'),
                           'passes/text.html\n')
 
     def test_single_file_with_prefix(self):
         tests_run = get_tests_run(['LayoutTests/passes/text.html'], tests_included=True, flatten_batches=True)
-        self.assertEquals(['passes/text.html'], tests_run)
+        self.assertEqual(['passes/text.html'], tests_run)
 
     def test_single_skipped_file(self):
         tests_run = get_tests_run(['failures/expected/keybaord.html'], tests_included=True, flatten_batches=True)
-        self.assertEquals([], tests_run)
+        self.assertEqual([], tests_run)
 
     def test_stderr_is_saved(self):
         host = MockHost()
         self.assertTrue(passing_run(host=host))
-        self.assertEquals(host.filesystem.read_text_file('/tmp/layout-test-results/passes/error-stderr.txt'),
+        self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-results/passes/error-stderr.txt'),
                           'stuff going to stderr')
 
     def test_test_list(self):
@@ -532,7 +532,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         filename = '/tmp/foo.txt'
         host.filesystem.write_text_file(filename, 'passes/text.html')
         tests_run = get_tests_run(['--test-list=%s' % filename], tests_included=True, flatten_batches=True, host=host)
-        self.assertEquals(['passes/text.html'], tests_run)
+        self.assertEqual(['passes/text.html'], tests_run)
         host.filesystem.remove(filename)
         res, out, err, user = logging_run(['--test-list=%s' % filename],
                                           tests_included=True, host=host)
@@ -544,7 +544,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         filename = '/tmp/foo.txt'
         host.filesystem.write_text_file(filename, 'LayoutTests/passes/text.html')
         tests_run = get_tests_run(['--test-list=%s' % filename], tests_included=True, flatten_batches=True, host=host)
-        self.assertEquals(['passes/text.html'], tests_run)
+        self.assertEqual(['passes/text.html'], tests_run)
 
     def test_unexpected_failures(self):
         # Run tests including the unexpected failures.
@@ -567,7 +567,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             tests_included=True, host=host, record_results=True)
         file_list = host.filesystem.written_files.keys()
         file_list.remove('/tmp/layout-test-results/tests_run0.txt')
-        self.assertEquals(res, 1)
+        self.assertEqual(res, 1)
         expected_token = '"unexpected":{"text-image-checksum.html":{"expected":"PASS","actual":"IMAGE+TEXT","image_diff_percent":1},"missing_text.html":{"expected":"PASS","is_missing_text":true,"actual":"MISSING"}'
         json_string = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
         self.assertTrue(json_string.find(expected_token) != -1)
@@ -584,7 +584,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
                 'failures/unexpected/image_not_in_pixeldir.html']
         res, out, err, _ = logging_run(extra_args=args, host=host, record_results=True, tests_included=True)
 
-        self.assertEquals(res, 1)
+        self.assertEqual(res, 1)
         expected_token = '"unexpected":{"pixeldir":{"image_in_pixeldir.html":{"expected":"PASS","actual":"IMAGE"'
         json_string = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
         self.assertTrue(json_string.find(expected_token) != -1)
@@ -604,7 +604,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             'failures/unexpected/missing_text.html',
             'failures/unexpected/text-image-checksum.html'],
             tests_included=True, host=host, record_results=True, port_obj=test_port)
-        self.assertEquals(res, 2)
+        self.assertEqual(res, 2)
 
     def test_crash_with_stderr(self):
         host = MockHost()
@@ -641,7 +641,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             record_results=True,
             host=host)
         expected_crash_log = mock_crash_report
-        self.assertEquals(host.filesystem.read_text_file('/tmp/layout-test-results/failures/unexpected/crash-with-stderr-crash-log.txt'), expected_crash_log)
+        self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-results/failures/unexpected/crash-with-stderr-crash-log.txt'), expected_crash_log)
 
     def test_web_process_crash_log(self):
         # FIXME: Need to rewrite these tests to not be mac-specific, or move them elsewhere.
@@ -657,7 +657,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             tests_included=True,
             record_results=True,
             host=host)
-        self.assertEquals(host.filesystem.read_text_file('/tmp/layout-test-results/failures/unexpected/web-process-crash-with-stderr-crash-log.txt'), mock_crash_report)
+        self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-results/failures/unexpected/web-process-crash-with-stderr-crash-log.txt'), mock_crash_report)
 
     def test_exit_after_n_failures_upload(self):
         host = MockHost()
@@ -674,7 +674,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         self.assertFalse(host.filesystem.exists('/tmp/layout-test-results/incremental_results.json'))
 
         # This checks that we report only the number of tests that actually failed.
-        self.assertEquals(res, 1)
+        self.assertEqual(res, 1)
 
         # This checks that passes/text.html is considered SKIPped.
         self.assertTrue('"skipped":1' in host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json'))
@@ -695,7 +695,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             ],
             tests_included=True,
             flatten_batches=True)
-        self.assertEquals(['failures/unexpected/text-image-checksum.html'], tests_run)
+        self.assertEqual(['failures/unexpected/text-image-checksum.html'], tests_run)
 
         # But we'll keep going for expected ones.
         tests_run = get_tests_run([
@@ -705,7 +705,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             ],
             tests_included=True,
             flatten_batches=True)
-        self.assertEquals(['failures/expected/text.html', 'passes/text.html'], tests_run)
+        self.assertEqual(['failures/expected/text.html', 'passes/text.html'], tests_run)
 
     def test_exit_after_n_crashes(self):
         # Unexpected crashes should result in tests stopping.
@@ -716,7 +716,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             ],
             tests_included=True,
             flatten_batches=True)
-        self.assertEquals(['failures/unexpected/crash.html'], tests_run)
+        self.assertEqual(['failures/unexpected/crash.html'], tests_run)
 
         # Same with timeouts.
         tests_run = get_tests_run([
@@ -726,7 +726,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             ],
             tests_included=True,
             flatten_batches=True)
-        self.assertEquals(['failures/unexpected/timeout.html'], tests_run)
+        self.assertEqual(['failures/unexpected/timeout.html'], tests_run)
 
         # But we'll keep going for expected ones.
         tests_run = get_tests_run([
@@ -736,7 +736,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
             ],
             tests_included=True,
             flatten_batches=True)
-        self.assertEquals(['failures/expected/crash.html', 'passes/text.html'], tests_run)
+        self.assertEqual(['failures/expected/crash.html', 'passes/text.html'], tests_run)
 
     def test_results_directory_absolute(self):
         # We run a configuration that should fail, to generate output, then
@@ -769,7 +769,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
     def test_retrying_and_flaky_tests(self):
         host = MockHost()
         res, out, err, _ = logging_run(['--debug-rwt-logging', 'failures/flaky'], tests_included=True, host=host)
-        self.assertEquals(res, 0)
+        self.assertEqual(res, 0)
         self.assertTrue('Retrying' in err.getvalue())
         self.assertTrue('Unexpected flakiness' in out.getvalue())
         self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/flaky/text-actual.txt'))
@@ -780,7 +780,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         # and that we don't retry again.
         host = MockHost()
         res, out, err, _ = logging_run(['--no-retry-failures', '--clobber-old-results', 'failures/flaky'], tests_included=True, host=host)
-        self.assertEquals(res, 1)
+        self.assertEqual(res, 1)
         self.assertTrue('Clobbering old results' in err.getvalue())
         self.assertTrue('flaky/text.html' in err.getvalue())
         self.assertTrue('Unexpected text-only failures' in out.getvalue())
@@ -793,10 +793,10 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         # order per directory. HTTP tests are sharded separately from other tests,
         # so we have to test both.
         tests_run = get_tests_run(['-i', 'passes/passes', 'passes'], tests_included=True, flatten_batches=True)
-        self.assertEquals(tests_run, sorted(tests_run))
+        self.assertEqual(tests_run, sorted(tests_run))
 
         tests_run = get_tests_run(['http/tests/passes'], tests_included=True, flatten_batches=True)
-        self.assertEquals(tests_run, sorted(tests_run))
+        self.assertEqual(tests_run, sorted(tests_run))
 
     def test_tolerance(self):
         class ImageDiffTestPort(TestPort):
@@ -831,29 +831,29 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
 
     def test_reftest_run(self):
         tests_run = get_tests_run(['passes/reftest.html'], tests_included=True, flatten_batches=True)
-        self.assertEquals(['passes/reftest.html'], tests_run)
+        self.assertEqual(['passes/reftest.html'], tests_run)
 
     def test_reftest_run_reftests_if_pixel_tests_are_disabled(self):
         tests_run = get_tests_run(['--no-pixel-tests', 'passes/reftest.html'], tests_included=True, flatten_batches=True)
-        self.assertEquals(['passes/reftest.html'], tests_run)
+        self.assertEqual(['passes/reftest.html'], tests_run)
 
     def test_reftest_skip_reftests_if_no_ref_tests(self):
         tests_run = get_tests_run(['--no-ref-tests', 'passes/reftest.html'], tests_included=True, flatten_batches=True)
-        self.assertEquals([], tests_run)
+        self.assertEqual([], tests_run)
         tests_run = get_tests_run(['--no-ref-tests', '--no-pixel-tests', 'passes/reftest.html'], tests_included=True, flatten_batches=True)
-        self.assertEquals([], tests_run)
+        self.assertEqual([], tests_run)
 
     def test_reftest_expected_html_should_be_ignored(self):
         tests_run = get_tests_run(['passes/reftest-expected.html'], tests_included=True, flatten_batches=True)
-        self.assertEquals([], tests_run)
+        self.assertEqual([], tests_run)
 
     def test_reftest_driver_should_run_expected_html(self):
         tests_run = get_tests_run(['passes/reftest.html'], tests_included=True, flatten_batches=True, include_reference_html=True)
-        self.assertEquals(['passes/reftest.html', 'passes/reftest-expected.html'], tests_run)
+        self.assertEqual(['passes/reftest.html', 'passes/reftest-expected.html'], tests_run)
 
     def test_reftest_driver_should_run_expected_mismatch_html(self):
         tests_run = get_tests_run(['passes/mismatch.html'], tests_included=True, flatten_batches=True, include_reference_html=True)
-        self.assertEquals(['passes/mismatch.html', 'passes/mismatch-expected-mismatch.html'], tests_run)
+        self.assertEqual(['passes/mismatch.html', 'passes/mismatch-expected-mismatch.html'], tests_run)
 
     def test_reftest_should_not_use_naming_convention_if_not_listed_in_reftestlist(self):
         host = MockHost()
@@ -916,8 +916,8 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
 
         full_results_text = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
         full_results = json.loads(full_results_text.replace("ADD_RESULTS(", "").replace(");", ""))
-        self.assertEquals(full_results['has_wdiff'], False)
-        self.assertEquals(full_results['has_pretty_patch'], False)
+        self.assertEqual(full_results['has_wdiff'], False)
+        self.assertEqual(full_results['has_pretty_patch'], False)
 
     def test_unsupported_platform(self):
         oc = outputcapture.OutputCapture()
@@ -927,12 +927,12 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
         finally:
             stdout, stderr, logs = oc.restore_output()
 
-        self.assertEquals(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS)
-        self.assertEquals(stdout, '')
+        self.assertEqual(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS)
+        self.assertEqual(stdout, '')
         self.assertTrue('unsupported platform' in stderr)
 
         # This is empty because we don't even get a chance to configure the logger before failing.
-        self.assertEquals(logs, '')
+        self.assertEqual(logs, '')
 
     def test_verbose_in_child_processes(self):
         # When we actually run multiple processes, we may have to reconfigure logging in the
@@ -964,11 +964,11 @@ class EndToEndTest(unittest.TestCase):
         host = MockHost()
         res, out, err, user = logging_run(record_results=True, tests_included=True, host=host)
 
-        self.assertEquals(res, unexpected_tests_count)
+        self.assertEqual(res, unexpected_tests_count)
         results = self.parse_full_results(host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json'))
 
         # Check to ensure we're passing back image diff %age correctly.
-        self.assertEquals(results['tests']['failures']['expected']['image.html']['image_diff_percent'], 1)
+        self.assertEqual(results['tests']['failures']['expected']['image.html']['image_diff_percent'], 1)
 
         # Check that we attempted to display the results page in a browser.
         self.assertTrue(user.opened_urls)
@@ -1016,7 +1016,7 @@ class RebaselineTest(unittest.TestCase, StreamTestingMixin):
                         tests_included=True, host=host, new_results=True)
         file_list = host.filesystem.written_files.keys()
         file_list.remove('/tmp/layout-test-results/tests_run0.txt')
-        self.assertEquals(res, 0)
+        self.assertEqual(res, 0)
         self.assertEmpty(out)
         self.assertEqual(len(file_list), 4)
         self.assertBaselines(file_list, "passes/image", [".txt", ".png"], err)
@@ -1034,7 +1034,7 @@ class RebaselineTest(unittest.TestCase, StreamTestingMixin):
                      tests_included=True, host=host, new_results=True)
         file_list = host.filesystem.written_files.keys()
         file_list.remove('/tmp/layout-test-results/tests_run0.txt')
-        self.assertEquals(res, 0)
+        self.assertEqual(res, 0)
         self.assertNotEmpty(out)
         self.assertEqual(len(file_list), 6)
         self.assertBaselines(file_list, "failures/unexpected/missing_text", [".txt"], err)
@@ -1052,7 +1052,7 @@ class RebaselineTest(unittest.TestCase, StreamTestingMixin):
                     tests_included=True, host=host, new_results=True)
         file_list = host.filesystem.written_files.keys()
         file_list.remove('/tmp/layout-test-results/tests_run0.txt')
-        self.assertEquals(res, 0)
+        self.assertEqual(res, 0)
         self.assertEmpty(out)
         self.assertEqual(len(file_list), 4)
         self.assertBaselines(file_list,
index 237d689..37faa64 100755 (executable)
@@ -80,9 +80,9 @@ class BaseTest(unittest.TestCase):
             return
 
         self.assert_servers_are_down()
-        self.assertEquals(self.run_script(['--server', 'start']), 0)
+        self.assertEqual(self.run_script(['--server', 'start']), 0)
         self.assert_servers_are_up()
-        self.assertEquals(self.run_script(['--server', 'stop']), 0)
+        self.assertEqual(self.run_script(['--server', 'stop']), 0)
         self.assert_servers_are_down()
 
     def integration_test_server__fails(self):
@@ -99,13 +99,13 @@ class BaseTest(unittest.TestCase):
                     if e.errno in (errno.EADDRINUSE, errno.EALREADY):
                         self.fail('could not bind to port %d: %s' % (port_number, str(e)))
                     raise
-                self.assertEquals(self.run_script(['--server', 'start']), 1)
+                self.assertEqual(self.run_script(['--server', 'start']), 1)
             finally:
                 self.run_script(['--server', 'stop'])
                 test_socket.close()
 
         # Test that calling stop() twice is harmless.
-        self.assertEquals(self.run_script(['--server', 'stop']), 0)
+        self.assertEqual(self.run_script(['--server', 'stop']), 0)
 
     def maybe_make_dir(self, *comps):
         try:
@@ -124,9 +124,9 @@ class BaseTest(unittest.TestCase):
         self.maybe_make_dir(tmpdir, 'media')
 
         self.assert_servers_are_down([18000])
-        self.assertEquals(self.run_script(['--server', 'start', '--port=18000', '--root', tmpdir]), 0)
+        self.assertEqual(self.run_script(['--server', 'start', '--port=18000', '--root', tmpdir]), 0)
         self.assert_servers_are_up([18000])
-        self.assertEquals(self.run_script(['--server', 'stop']), 0)
+        self.assertEqual(self.run_script(['--server', 'stop']), 0)
         self.assert_servers_are_down([18000])
 
 
index 7a14526..5cc4a6e 100644 (file)
@@ -56,7 +56,7 @@ class TestHttpServer(unittest.TestCase):
         self.assertRaises(ServerError, server.start)
 
         config_file = host.filesystem.read_text_file("/mock/output_dir/lighttpd.conf")
-        self.assertEquals(re.findall(r"alias.url.+", config_file), [
+        self.assertEqual(re.findall(r"alias.url.+", config_file), [
             'alias.url = ( "/js-test-resources" => "/test.checkout/LayoutTests/fast/js/resources" )',
             'alias.url += ( "/mock/one-additional-dir" => "/mock-checkout/one-additional-dir" )',
             'alias.url += ( "/mock/another-additional-dir" => "/mock-checkout/one-additional-dir" )',
index b388ec6..6620cbb 100644 (file)
@@ -76,7 +76,7 @@ class RegularTest(unittest.TestCase):
             self.meter.write_throttled_update('foo')
             self.meter.write_update('bar')
             self.meter.write('baz')
-            self.assertEquals(logging_stream.buflist, [])
+            self.assertEqual(logging_stream.buflist, [])
         finally:
             root_logger.removeHandler(handler)
             root_logger.setLevel(orig_level)
@@ -88,12 +88,12 @@ class RegularTest(unittest.TestCase):
         self.meter.write_throttled_update('baz')
         self.meter.write_throttled_update('baz 2')
         self.meter.writeln('done')
-        self.assertEquals(self.times, [])
+        self.assertEqual(self.times, [])
         return self.buflist
 
     def test_basic(self):
         buflist = self._basic([0, 1, 2, 13, 14])
-        self.assertEquals(buflist, ['foo\n', 'bar\n', 'baz 2\n', 'done\n'])
+        self.assertEqual(buflist, ['foo\n', 'bar\n', 'baz 2\n', 'done\n'])
 
     def _log_after_update(self):
         self.meter.write_update('foo')
@@ -102,11 +102,11 @@ class RegularTest(unittest.TestCase):
 
     def test_log_after_update(self):
         buflist = self._log_after_update()
-        self.assertEquals(buflist, ['foo\n', 'bar\n'])
+        self.assertEqual(buflist, ['foo\n', 'bar\n'])
 
     def test_log_args(self):
         self.logger.info('foo %s %d', 'bar', 2)
-        self.assertEquals(self.buflist, ['foo bar 2\n'])
+        self.assertEqual(self.buflist, ['foo bar 2\n'])
 
 class TtyTest(RegularTest):
     verbose = False
@@ -114,14 +114,14 @@ class TtyTest(RegularTest):
 
     def test_basic(self):
         buflist = self._basic([0, 1, 1.05, 1.1, 2])
-        self.assertEquals(buflist, ['foo',
+        self.assertEqual(buflist, ['foo',
                                      MeteredStream._erasure('foo'), 'bar',
                                      MeteredStream._erasure('bar'), 'baz 2',
                                      MeteredStream._erasure('baz 2'), 'done\n'])
 
     def test_log_after_update(self):
         buflist = self._log_after_update()
-        self.assertEquals(buflist, ['foo',
+        self.assertEqual(buflist, ['foo',
                                      MeteredStream._erasure('foo'), 'bar\n'])
 
 
@@ -137,7 +137,7 @@ class VerboseTest(RegularTest):
         self.assertTrue(re.match('\d\d:\d\d:01.000 8675 bar\n', buflist[1]))
         self.assertTrue(re.match('\d\d:\d\d:13.000 8675 baz 2\n', buflist[2]))
         self.assertTrue(re.match('\d\d:\d\d:14.123 8675 done\n', buflist[3]))
-        self.assertEquals(len(buflist), 4)
+        self.assertEqual(len(buflist), 4)
 
     def test_log_after_update(self):
         buflist = self._log_after_update()
@@ -146,11 +146,11 @@ class VerboseTest(RegularTest):
         # The second argument should have a real timestamp and pid, so we just check the format.
         self.assertTrue(re.match('\d\d:\d\d:\d\d.\d\d\d \d+ bar\n', buflist[1]))
 
-        self.assertEquals(len(buflist), 2)
+        self.assertEqual(len(buflist), 2)
 
     def test_log_args(self):
         self.logger.info('foo %s %d', 'bar', 2)
-        self.assertEquals(len(self.buflist), 1)
+        self.assertEqual(len(self.buflist), 1)
         self.assertTrue(self.buflist[0].endswith('foo bar 2\n'))
 
 
index bc30092..c0b928b 100644 (file)
@@ -67,7 +67,7 @@ class  Testprinter(unittest.TestCase):
         self.assertTrue(stream.getvalue())
 
     def assertWritten(self, stream, contents):
-        self.assertEquals(stream.buflist, contents)
+        self.assertEqual(stream.buflist, contents)
 
     def reset(self, stream):
         stream.buflist = []
@@ -259,27 +259,27 @@ BUGX : failures/expected/timeout.html = TIMEOUT
         printer, _, _ = self.get_printer()
         printer._meter.number_of_columns = lambda: 80
         actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed')
-        self.assertEquals(80, len(actual))
-        self.assertEquals(actual, '[0/0] fast/dom/HTMLFormElement/associa...after-index-assertion-fail1.html passed')
+        self.assertEqual(80, len(actual))
+        self.assertEqual(actual, '[0/0] fast/dom/HTMLFormElement/associa...after-index-assertion-fail1.html passed')
 
         printer._meter.number_of_columns = lambda: 89
         actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed')
-        self.assertEquals(89, len(actual))
-        self.assertEquals(actual, '[0/0] fast/dom/HTMLFormElement/associated-...ents-after-index-assertion-fail1.html passed')
+        self.assertEqual(89, len(actual))
+        self.assertEqual(actual, '[0/0] fast/dom/HTMLFormElement/associated-...ents-after-index-assertion-fail1.html passed')
 
         printer._meter.number_of_columns = lambda: sys.maxint
         actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed')
-        self.assertEquals(90, len(actual))
-        self.assertEquals(actual, '[0/0] fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html passed')
+        self.assertEqual(90, len(actual))
+        self.assertEqual(actual, '[0/0] fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html passed')
 
         printer._meter.number_of_columns = lambda: 18
         actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed')
-        self.assertEquals(18, len(actual))
-        self.assertEquals(actual, '[0/0] f...l passed')
+        self.assertEqual(18, len(actual))
+        self.assertEqual(actual, '[0/0] f...l passed')
 
         printer._meter.number_of_columns = lambda: 10
         actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed')
-        self.assertEquals(actual, '[0/0] associated-elements-after-index-assertion-fail1.html passed')
+        self.assertEqual(actual, '[0/0] associated-elements-after-index-assertion-fail1.html passed')
 
     def test_details(self):
         printer, err, _ = self.get_printer(['--details'])
index 9c9295f..62e7353 100755 (executable)
@@ -47,7 +47,7 @@ from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner
 
 class MainTest(unittest.TestCase):
     def assertWritten(self, stream, contents):
-        self.assertEquals(stream.buflist, contents)
+        self.assertEqual(stream.buflist, contents)
 
     def normalizeFinishedTime(self, log):
         return re.sub(r'Finished: [0-9\.]+ s', 'Finished: 0.1 s', log)
index d834fd5..3de39eb 100755 (executable)
@@ -169,7 +169,7 @@ class GlobalVariablesTest(unittest.TestCase):
         # Also do some additional checks.
         for rule in base_filter_rules:
             # Check no leading or trailing white space.
-            self.assertEquals(rule, rule.strip())
+            self.assertEqual(rule, rule.strip())
             # All categories are on by default, so defaults should
             # begin with -.
             self.assertTrue(rule.startswith('-'))
@@ -335,8 +335,8 @@ class CheckerDispatcherSkipTest(unittest.TestCase):
                                             handle_style_error=None,
                                             min_confidence=3)
         message = 'while checking: %s' % path
-        self.assertEquals(checker is None, is_checker_none, message)
-        self.assertEquals(self._dispatcher.should_skip_without_warning(path),
+        self.assertEqual(checker is None, is_checker_none, message)
+        self.assertEqual(self._dispatcher.should_skip_without_warning(path),
                           expected, message)
 
     def test_should_skip_without_warning__true(self):
@@ -378,7 +378,7 @@ class CheckerDispatcherCarriageReturnTest(unittest.TestCase):
 
         dispatcher = CheckerDispatcher()
         for file_path, expected_result in files.items():
-            self.assertEquals(dispatcher.should_check_and_strip_carriage_returns(file_path), expected_result, 'Checking: %s' % file_path)
+            self.assertEqual(dispatcher.should_check_and_strip_carriage_returns(file_path), expected_result, 'Checking: %s' % file_path)
 
 
 class CheckerDispatcherDispatchTest(unittest.TestCase):
@@ -403,7 +403,7 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
         """Assert the type of the dispatched checker."""
         checker = self.dispatch(file_path)
         got_class = checker.__class__
-        self.assertEquals(got_class, expected_class,
+        self.assertEqual(got_class, expected_class,
                           'For path "%(file_path)s" got %(got_class)s when '
                           "expecting %(expected_class)s."
                           % {"file_path": file_path,
@@ -449,8 +449,8 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
         file_path = "ChangeLog"
         self.assert_checker_changelog(file_path)
         checker = self.dispatch(file_path)
-        self.assertEquals(checker.file_path, file_path)
-        self.assertEquals(checker.handle_style_error,
+        self.assertEqual(checker.file_path, file_path)
+        self.assertEqual(checker.handle_style_error,
                           self.mock_handle_style_error)
 
     def test_cpp_paths(self):
@@ -471,18 +471,18 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
         file_path = file_base + "." + file_extension
         self.assert_checker_cpp(file_path)
         checker = self.dispatch(file_path)
-        self.assertEquals(checker.file_extension, file_extension)
-        self.assertEquals(checker.file_path, file_path)
-        self.assertEquals(checker.handle_style_error, self.mock_handle_style_error)
-        self.assertEquals(checker.min_confidence, 3)
+        self.assertEqual(checker.file_extension, file_extension)
+        self.assertEqual(checker.file_path, file_path)
+        self.assertEqual(checker.handle_style_error, self.mock_handle_style_error)
+        self.assertEqual(checker.min_confidence, 3)
         # Check "-" for good measure.
         file_base = "-"
         file_extension = ""
         file_path = file_base
         self.assert_checker_cpp(file_path)
         checker = self.dispatch(file_path)
-        self.assertEquals(checker.file_extension, file_extension)
-        self.assertEquals(checker.file_path, file_path)
+        self.assertEqual(checker.file_extension, file_extension)
+        self.assertEqual(checker.file_path, file_path)
 
     def test_json_paths(self):
         """Test paths that should be checked as JSON."""
@@ -500,7 +500,7 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
         file_path = file_base + "." + file_extension
         self.assert_checker_json(file_path)
         checker = self.dispatch(file_path)
-        self.assertEquals(checker._handle_style_error,
+        self.assertEqual(checker._handle_style_error,
                           self.mock_handle_style_error)
 
     def test_python_paths(self):
@@ -519,8 +519,8 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
         file_path = file_base + "." + file_extension
         self.assert_checker_text(file_path)
         checker = self.dispatch(file_path)
-        self.assertEquals(checker.file_path, file_path)
-        self.assertEquals(checker.handle_style_error,
+        self.assertEqual(checker.file_path, file_path)
+        self.assertEqual(checker.handle_style_error,
                           self.mock_handle_style_error)
 
     def test_text_paths(self):
@@ -563,8 +563,8 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
         file_path = file_base + "." + file_extension
         self.assert_checker_text(file_path)
         checker = self.dispatch(file_path)
-        self.assertEquals(checker.file_path, file_path)
-        self.assertEquals(checker.handle_style_error, self.mock_handle_style_error)
+        self.assertEqual(checker.file_path, file_path)
+        self.assertEqual(checker.handle_style_error, self.mock_handle_style_error)
 
     def test_xml_paths(self):
         """Test paths that should be checked as XML."""
@@ -582,7 +582,7 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
         file_path = file_base + "." + file_extension
         self.assert_checker_xml(file_path)
         checker = self.dispatch(file_path)
-        self.assertEquals(checker._handle_style_error,
+        self.assertEqual(checker._handle_style_error,
                           self.mock_handle_style_error)
 
     def test_none_paths(self):
@@ -625,10 +625,10 @@ class StyleProcessorConfigurationTest(unittest.TestCase):
         configuration = self._style_checker_configuration()
 
         # Check that __init__ sets the "public" data attributes correctly.
-        self.assertEquals(configuration.max_reports_per_category,
+        self.assertEqual(configuration.max_reports_per_category,
                           {"whitespace/newline": 1})
-        self.assertEquals(configuration.stderr_write, self._mock_stderr_write)
-        self.assertEquals(configuration.min_confidence, 3)
+        self.assertEqual(configuration.stderr_write, self._mock_stderr_write)
+        self.assertEqual(configuration.min_confidence, 3)
 
     def test_is_reportable(self):
         """Test the is_reportable() method."""
@@ -653,13 +653,13 @@ class StyleProcessorConfigurationTest(unittest.TestCase):
     def test_write_style_error_emacs(self):
         """Test the write_style_error() method."""
         self._call_write_style_error("emacs")
-        self.assertEquals(self._error_messages,
+        self.assertEqual(self._error_messages,
                           ["foo.h:100:  message  [whitespace/tab] [5]\n"])
 
     def test_write_style_error_vs7(self):
         """Test the write_style_error() method."""
         self._call_write_style_error("vs7")
-        self.assertEquals(self._error_messages,
+        self.assertEqual(self._error_messages,
                           ["foo.h(100):  message  [whitespace/tab] [5]\n"])
 
 
@@ -685,8 +685,8 @@ class StyleProcessor_EndToEndTest(LoggingTestCase):
                             stderr_write=self._mock_stderr_write)
         processor = StyleProcessor(configuration)
 
-        self.assertEquals(processor.error_count, 0)
-        self.assertEquals(self._messages, [])
+        self.assertEqual(processor.error_count, 0)
+        self.assertEqual(self._messages, [])
 
     def test_process(self):
         configuration = StyleProcessorConfiguration(
@@ -699,10 +699,10 @@ class StyleProcessor_EndToEndTest(LoggingTestCase):
 
         processor.process(lines=['line1', 'Line with tab:\t'],
                           file_path='foo.txt')
-        self.assertEquals(processor.error_count, 1)
+        self.assertEqual(processor.error_count, 1)
         expected_messages = ['foo.txt(2):  Line contains tab character.  '
                              '[whitespace/tab] [5]\n']
-        self.assertEquals(self._messages, expected_messages)
+        self.assertEqual(self._messages, expected_messages)
 
 
 class StyleProcessor_CodeCoverageTest(LoggingTestCase):
@@ -861,18 +861,18 @@ class StyleProcessor_CodeCoverageTest(LoggingTestCase):
         # Check that the carriage-return checker was instantiated correctly
         # and was passed lines correctly.
         carriage_checker = self.carriage_checker
-        self.assertEquals(carriage_checker.style_error_handler,
+        self.assertEqual(carriage_checker.style_error_handler,
                           expected_error_handler)
-        self.assertEquals(carriage_checker.lines, ['line1', 'line2'])
+        self.assertEqual(carriage_checker.lines, ['line1', 'line2'])
 
         # Check that the style checker was dispatched correctly and was
         # passed lines correctly.
         checker = self._mock_dispatcher.dispatched_checker
-        self.assertEquals(checker.file_path, 'foo.txt')
-        self.assertEquals(checker.min_confidence, 3)
-        self.assertEquals(checker.style_error_handler, expected_error_handler)
+        self.assertEqual(checker.file_path, 'foo.txt')
+        self.assertEqual(checker.min_confidence, 3)
+        self.assertEqual(checker.style_error_handler, expected_error_handler)
 
-        self.assertEquals(checker.lines, ['line1', 'line2'])
+        self.assertEqual(checker.lines, ['line1', 'line2'])
 
     def test_process__no_checker_dispatched(self):
         """Test the process() method for a path with no dispatched checker."""
index 9fe8a60..315cd91 100644 (file)
@@ -44,8 +44,8 @@ class ChangeLogCheckerTest(unittest.TestCase):
 
         def handle_style_error(line_number, category, confidence, message):
             self.had_error = True
-            self.assertEquals(expected_line_number, line_number)
-            self.assertEquals(expected_category, category)
+            self.assertEqual(expected_line_number, line_number)
+            self.assertEqual(expected_category, category)
         self.lines_to_check = set(lines_to_check)
         checker = changelog.ChangeLogChecker('ChangeLog', handle_style_error, self.mock_should_line_be_checked)
         checker.check(changelog_data.split('\n'))
@@ -59,9 +59,9 @@ class ChangeLogCheckerTest(unittest.TestCase):
 
     def test_init(self):
         checker = changelog.ChangeLogChecker('ChangeLog', self.mock_handle_style_error, self.mock_should_line_be_checked)
-        self.assertEquals(checker.file_path, 'ChangeLog')
-        self.assertEquals(checker.handle_style_error, self.mock_handle_style_error)
-        self.assertEquals(checker.should_line_be_checked, self.mock_should_line_be_checked)
+        self.assertEqual(checker.file_path, 'ChangeLog')
+        self.assertEqual(checker.handle_style_error, self.mock_handle_style_error)
+        self.assertEqual(checker.should_line_be_checked, self.mock_should_line_be_checked)
 
     def test_missing_bug_number(self):
         self.assert_error(1, range(1, 20), 'changelog/bugnumber',
index 1fe1263..df47077 100644 (file)
@@ -59,12 +59,12 @@ class CarriageReturnCheckerTest(unittest.TestCase):
         output_lines = checker.check(input_lines)
 
         # Check both the return value and error messages.
-        self.assertEquals(output_lines, expected_lines)
+        self.assertEqual(output_lines, expected_lines)
 
         expected_errors = [(line_number, self._category, self._confidence,
                             self._expected_message)
                            for line_number in error_lines]
-        self.assertEquals(self._style_errors, expected_errors)
+        self.assertEqual(self._style_errors, expected_errors)
 
     def test_ends_with_carriage(self):
         self.assert_carriage_return(["carriage return\r"],
@@ -110,7 +110,7 @@ class TabCheckerTest(unittest.TestCase):
 
         checker = TabChecker('', style_error_handler)
         checker.check(input_lines)
-        self.assertEquals(self._error_lines, error_lines)
+        self.assertEqual(self._error_lines, error_lines)
 
     def test_notab(self):
         self.assert_tab([''], [])
index 5522201..6de7df6 100644 (file)
@@ -116,17 +116,17 @@ class CppFunctionsTest(unittest.TestCase):
     """Supports testing functions that do not need CppStyleTestBase."""
 
     def test_convert_to_lower_with_underscores(self):
-        self.assertEquals(cpp_style._convert_to_lower_with_underscores('ABC'), 'abc')
-        self.assertEquals(cpp_style._convert_to_lower_with_underscores('aB'), 'a_b')
-        self.assertEquals(cpp_style._convert_to_lower_with_underscores('isAName'), 'is_a_name')
-        self.assertEquals(cpp_style._convert_to_lower_with_underscores('AnotherTest'), 'another_test')
-        self.assertEquals(cpp_style._convert_to_lower_with_underscores('PassRefPtr<MyClass>'), 'pass_ref_ptr<my_class>')
-        self.assertEquals(cpp_style._convert_to_lower_with_underscores('_ABC'), '_abc')
+        self.assertEqual(cpp_style._convert_to_lower_with_underscores('ABC'), 'abc')
+        self.assertEqual(cpp_style._convert_to_lower_with_underscores('aB'), 'a_b')
+        self.assertEqual(cpp_style._convert_to_lower_with_underscores('isAName'), 'is_a_name')
+        self.assertEqual(cpp_style._convert_to_lower_with_underscores('AnotherTest'), 'another_test')
+        self.assertEqual(cpp_style._convert_to_lower_with_underscores('PassRefPtr<MyClass>'), 'pass_ref_ptr<my_class>')
+        self.assertEqual(cpp_style._convert_to_lower_with_underscores('_ABC'), '_abc')
 
     def test_create_acronym(self):
-        self.assertEquals(cpp_style._create_acronym('ABC'), 'ABC')
-        self.assertEquals(cpp_style._create_acronym('IsAName'), 'IAN')
-        self.assertEquals(cpp_style._create_acronym('PassRefPtr<MyClass>'), 'PRP<MC>')
+        self.assertEqual(cpp_style._create_acronym('ABC'), 'ABC')
+        self.assertEqual(cpp_style._create_acronym('IsAName'), 'IAN')
+        self.assertEqual(cpp_style._create_acronym('PassRefPtr<MyClass>'), 'PRP<MC>')
 
     def test_is_c_or_objective_c(self):
         clean_lines = cpp_style.CleansedLines([''])
@@ -141,68 +141,68 @@ class CppFunctionsTest(unittest.TestCase):
     def test_parameter(self):
         # Test type.
         parameter = cpp_style.Parameter('ExceptionCode', 13, 1)
-        self.assertEquals(parameter.type, 'ExceptionCode')
-        self.assertEquals(parameter.name, '')
-        self.assertEquals(parameter.row, 1)
+        self.assertEqual(parameter.type, 'ExceptionCode')
+        self.assertEqual(parameter.name, '')
+        self.assertEqual(parameter.row, 1)
 
         # Test type and name.
         parameter = cpp_style.Parameter('PassRefPtr<MyClass> parent', 19, 1)
-        self.assertEquals(parameter.type, 'PassRefPtr<MyClass>')
-        self.assertEquals(parameter.name, 'parent')
-        self.assertEquals(parameter.row, 1)
+        self.assertEqual(parameter.type, 'PassRefPtr<MyClass>')
+        self.assertEqual(parameter.name, 'parent')
+        self.assertEqual(parameter.row, 1)
 
         # Test type, no name, with default value.
         parameter = cpp_style.Parameter('MyClass = 0', 7, 0)
-        self.assertEquals(parameter.type, 'MyClass')
-        self.assertEquals(parameter.name, '')
-        self.assertEquals(parameter.row, 0)
+        self.assertEqual(parameter.type, 'MyClass')
+        self.assertEqual(parameter.name, '')
+        self.assertEqual(parameter.row, 0)
 
         # Test type, name, and default value.
         parameter = cpp_style.Parameter('MyClass a = 0', 7, 0)
-        self.assertEquals(parameter.type, 'MyClass')
-        self.assertEquals(parameter.name, 'a')
-        self.assertEquals(parameter.row, 0)
+        self.assertEqual(parameter.type, 'MyClass')
+        self.assertEqual(parameter.name, 'a')
+        self.assertEqual(parameter.row, 0)
 
     def test_single_line_view(self):
         start_position = cpp_style.Position(row=1, column=1)
         end_position = cpp_style.Position(row=3, column=1)
         single_line_view = cpp_style.SingleLineView(['0', 'abcde', 'fgh', 'i'], start_position, end_position)
-        self.assertEquals(single_line_view.single_line, 'bcde fgh i')
-        self.assertEquals(single_line_view.convert_column_to_row(0), 1)
-        self.assertEquals(single_line_view.convert_column_to_row(4), 1)
-        self.assertEquals(single_line_view.convert_column_to_row(5), 2)
-        self.assertEquals(single_line_view.convert_column_to_row(8), 2)
-        self.assertEquals(single_line_view.convert_column_to_row(9), 3)
-        self.assertEquals(single_line_view.convert_column_to_row(100), 3)
+        self.assertEqual(single_line_view.single_line, 'bcde fgh i')
+        self.assertEqual(single_line_view.convert_column_to_row(0), 1)
+        self.assertEqual(single_line_view.convert_column_to_row(4), 1)
+        self.assertEqual(single_line_view.convert_column_to_row(5), 2)
+        self.assertEqual(single_line_view.convert_column_to_row(8), 2)
+        self.assertEqual(single_line_view.convert_column_to_row(9), 3)
+        self.assertEqual(single_line_view.convert_column_to_row(100), 3)
 
         start_position = cpp_style.Position(row=0, column=3)
         end_position = cpp_style.Position(row=0, column=4)
         single_line_view = cpp_style.SingleLineView(['abcdef'], start_position, end_position)
-        self.assertEquals(single_line_view.single_line, 'd')
+        self.assertEqual(single_line_view.single_line, 'd')
 
     def test_create_skeleton_parameters(self):
-        self.assertEquals(cpp_style.create_skeleton_parameters(''), '')
-        self.assertEquals(cpp_style.create_skeleton_parameters(' '), ' ')
-        self.assertEquals(cpp_style.create_skeleton_parameters('long'), 'long,')
-        self.assertEquals(cpp_style.create_skeleton_parameters('const unsigned long int'), '                    int,')
-        self.assertEquals(cpp_style.create_skeleton_parameters('long int*'), '     int ,')
-        self.assertEquals(cpp_style.create_skeleton_parameters('PassRefPtr<Foo> a'), 'PassRefPtr      a,')
-        self.assertEquals(cpp_style.create_skeleton_parameters(
+        self.assertEqual(cpp_style.create_skeleton_parameters(''), '')
+        self.assertEqual(cpp_style.create_skeleton_parameters(' '), ' ')
+        self.assertEqual(cpp_style.create_skeleton_parameters('long'), 'long,')
+        self.assertEqual(cpp_style.create_skeleton_parameters('const unsigned long int'), '                    int,')
+        self.assertEqual(cpp_style.create_skeleton_parameters('long int*'), '     int ,')
+        self.assertEqual(cpp_style.create_skeleton_parameters('PassRefPtr<Foo> a'), 'PassRefPtr      a,')
+        self.assertEqual(cpp_style.create_skeleton_parameters(
                 'ComplexTemplate<NestedTemplate1<MyClass1, MyClass2>, NestedTemplate1<MyClass1, MyClass2> > param, int second'),
                           'ComplexTemplate                                                                            param, int second,')
-        self.assertEquals(cpp_style.create_skeleton_parameters('int = 0, Namespace::Type& a'), 'int    ,            Type  a,')
+        self.assertEqual(cpp_style.create_skeleton_parameters('int = 0, Namespace::Type& a'), 'int    ,            Type  a,')
         # Create skeleton parameters is a bit too aggressive with function variables, but
         # it allows for parsing other parameters and declarations like this are rare.
-        self.assertEquals(cpp_style.create_skeleton_parameters('void (*fn)(int a, int b), Namespace::Type& a'),
+        self.assertEqual(cpp_style.create_skeleton_parameters('void (*fn)(int a, int b), Namespace::Type& a'),
                           'void                    ,            Type  a,')
 
         # This doesn't look like functions declarations but the simplifications help to eliminate false positives.
-        self.assertEquals(cpp_style.create_skeleton_parameters('b{d}'), 'b   ,')
+        self.assertEqual(cpp_style.create_skeleton_parameters('b{d}'), 'b   ,')
 
     def test_find_parameter_name_index(self):
-        self.assertEquals(cpp_style.find_parameter_name_index(' int a '), 5)
-        self.assertEquals(cpp_style.find_parameter_name_index(' PassRefPtr     '), 16)
-        self.assertEquals(cpp_style.find_parameter_name_index('double'), 6)
+        self.assertEqual(cpp_style.find_parameter_name_index(' int a '), 5)
+        self.assertEqual(cpp_style.find_parameter_name_index(' PassRefPtr     '), 16)
+        self.assertEqual(cpp_style.find_parameter_name_index('double'), 6)
 
     def test_parameter_list(self):
         elided_lines = ['int blah(PassRefPtr<MyClass> paramName,',
@@ -219,17 +219,17 @@ class CppFunctionsTest(unittest.TestCase):
         index = 0
         for parameter in cpp_style.parameter_list(elided_lines, start_position, end_position):
             expected_parameter = expected_parameters[index]
-            self.assertEquals(parameter.type, expected_parameter['type'])
-            self.assertEquals(parameter.name, expected_parameter['name'])
-            self.assertEquals(parameter.row, expected_parameter['row'])
+            self.assertEqual(parameter.type, expected_parameter['type'])
+            self.assertEqual(parameter.name, expected_parameter['name'])
+            self.assertEqual(parameter.row, expected_parameter['row'])
             index += 1
-        self.assertEquals(index, len(expected_parameters))
+        self.assertEqual(index, len(expected_parameters))
 
     def test_check_parameter_against_text(self):
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         parameter = cpp_style.Parameter('FooF ooF', 4, 1)
         self.assertFalse(cpp_style._check_parameter_name_against_text(parameter, 'FooF', error_collector))
-        self.assertEquals(error_collector.results(),
+        self.assertEqual(error_collector.results(),
                           'The parameter name "ooF" adds no information, so it should be removed.  [readability/parameter_name] [5]')
 
 class CppStyleTestBase(unittest.TestCase):
@@ -253,7 +253,7 @@ class CppStyleTestBase(unittest.TestCase):
                                            error, self.min_confidence, unit_test_config)
 
     def perform_lint(self, code, filename, basic_error_rules, unit_test_config={}, lines_to_check=None):
-        error_collector = ErrorCollector(self.assert_, FilterConfiguration(basic_error_rules), lines_to_check)
+        error_collector = ErrorCollector(self.assertTrue, FilterConfiguration(basic_error_rules), lines_to_check)
         lines = code.split('\n')
         extension = filename.split('.')[1]
         self.process_file_data(filename, extension, lines, error_collector, unit_test_config)
@@ -313,7 +313,7 @@ class CppStyleTestBase(unittest.TestCase):
 
     # Perform lint and compare the error message with "expected_message".
     def assert_lint(self, code, expected_message, file_name='foo.cpp'):
-        self.assertEquals(expected_message, self.perform_single_line_lint(code, file_name))
+        self.assertEqual(expected_message, self.perform_single_line_lint(code, file_name))
 
     def assert_lint_one_of_many_errors_re(self, code, expected_message_re, file_name='foo.cpp'):
         messages = self.perform_single_line_lint(code, file_name)
@@ -321,11 +321,11 @@ class CppStyleTestBase(unittest.TestCase):
             if re.search(expected_message_re, message):
                 return
 
-        self.assertEquals(expected_message_re, messages)
+        self.assertEqual(expected_message_re, messages)
 
     def assert_multi_line_lint(self, code, expected_message, file_name='foo.h'):
         file_extension = file_name[file_name.rfind('.') + 1:]
-        self.assertEquals(expected_message, self.perform_multi_line_lint(code, file_extension))
+        self.assertEqual(expected_message, self.perform_multi_line_lint(code, file_extension))
 
     def assert_multi_line_lint_re(self, code, expected_message_re, file_name='foo.h'):
         file_extension = file_name[file_name.rfind('.') + 1:]
@@ -334,22 +334,22 @@ class CppStyleTestBase(unittest.TestCase):
             self.fail('Message was:\n' + message + 'Expected match to "' + expected_message_re + '"')
 
     def assert_language_rules_check(self, file_name, code, expected_message, lines_to_check=None):
-        self.assertEquals(expected_message,
+        self.assertEqual(expected_message,
                           self.perform_language_rules_check(file_name, code, lines_to_check))
 
     def assert_include_what_you_use(self, code, expected_message):
-        self.assertEquals(expected_message,
+        self.assertEqual(expected_message,
                           self.perform_include_what_you_use(code))
 
     def assert_blank_lines_check(self, lines, start_errors, end_errors):
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data('foo.cpp', 'cpp', lines, error_collector)
-        self.assertEquals(
+        self.assertEqual(
             start_errors,
             error_collector.results().count(
                 'Blank line at the start of a code block.  Is this needed?'
                 '  [whitespace/blank_line] [2]'))
-        self.assertEquals(
+        self.assertEqual(
             end_errors,
             error_collector.results().count(
                 'Blank line at the end of a code block.  Is this needed?'
@@ -360,7 +360,7 @@ class CppStyleTestBase(unittest.TestCase):
 
         position: a cpp_style.Position object.
         tuple_position: a tuple (row, column) to compare against."""
-        self.assertEquals(position, cpp_style.Position(tuple_position[0], tuple_position[1]),
+        self.assertEqual(position, cpp_style.Position(tuple_position[0], tuple_position[1]),
                           'position %s, tuple_position %s' % (position, tuple_position))
 
 
@@ -368,16 +368,16 @@ class FunctionDetectionTest(CppStyleTestBase):
     def perform_function_detection(self, lines, function_information, detection_line=0):
         clean_lines = cpp_style.CleansedLines(lines)
         function_state = cpp_style._FunctionState(5)
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         cpp_style.detect_functions(clean_lines, detection_line, function_state, error_collector)
         if not function_information:
-            self.assertEquals(function_state.in_a_function, False)
+            self.assertEqual(function_state.in_a_function, False)
             return
-        self.assertEquals(function_state.in_a_function, True)
-        self.assertEquals(function_state.current_function, function_information['name'] + '()')
-        self.assertEquals(function_state.modifiers_and_return_type(), function_information['modifiers_and_return_type'])
-        self.assertEquals(function_state.is_pure, function_information['is_pure'])
-        self.assertEquals(function_state.is_declaration, function_information['is_declaration'])
+        self.assertEqual(function_state.in_a_function, True)
+        self.assertEqual(function_state.current_function, function_information['name'] + '()')
+        self.assertEqual(function_state.modifiers_and_return_type(), function_information['modifiers_and_return_type'])
+        self.assertEqual(function_state.is_pure, function_information['is_pure'])
+        self.assertEqual(function_state.is_declaration, function_information['is_declaration'])
         self.assert_positions_equal(function_state.function_name_start_position, function_information['function_name_start_position'])
         self.assert_positions_equal(function_state.parameter_start_position, function_information['parameter_start_position'])
         self.assert_positions_equal(function_state.parameter_end_position, function_information['parameter_end_position'])
@@ -386,13 +386,13 @@ class FunctionDetectionTest(CppStyleTestBase):
         expected_parameters = function_information.get('parameter_list')
         if expected_parameters:
             actual_parameters = function_state.parameter_list()
-            self.assertEquals(len(actual_parameters), len(expected_parameters))
+            self.assertEqual(len(actual_parameters), len(expected_parameters))
             for index in range(len(expected_parameters)):
                 actual_parameter = actual_parameters[index]
                 expected_parameter = expected_parameters[index]
-                self.assertEquals(actual_parameter.type, expected_parameter['type'])
-                self.assertEquals(actual_parameter.name, expected_parameter['name'])
-                self.assertEquals(actual_parameter.row, expected_parameter['row'])
+                self.assertEqual(actual_parameter.type, expected_parameter['type'])
+                self.assertEqual(actual_parameter.name, expected_parameter['name'])
+                self.assertEqual(actual_parameter.row, expected_parameter['row'])
 
     def test_basic_function_detection(self):
         self.perform_function_detection(
@@ -634,54 +634,54 @@ class CppStyleTest(CppStyleTestBase):
 
     # Test get line width.
     def test_get_line_width(self):
-        self.assertEquals(0, cpp_style.get_line_width(''))
-        self.assertEquals(10, cpp_style.get_line_width(u'x' * 10))
-        self.assertEquals(16, cpp_style.get_line_width(u'都|道|府|県|支庁'))
+        self.assertEqual(0, cpp_style.get_line_width(''))
+        self.assertEqual(10, cpp_style.get_line_width(u'x' * 10))
+        self.assertEqual(16, cpp_style.get_line_width(u'都|道|府|県|支庁'))
 
     def test_find_next_multi_line_comment_start(self):
-        self.assertEquals(1, cpp_style.find_next_multi_line_comment_start([''], 0))
+        self.assertEqual(1, cpp_style.find_next_multi_line_comment_start([''], 0))
 
         lines = ['a', 'b', '/* c']
-        self.assertEquals(2, cpp_style.find_next_multi_line_comment_start(lines, 0))
+        self.assertEqual(2, cpp_style.find_next_multi_line_comment_start(lines, 0))
 
         lines = ['char a[] = "/*";']  # not recognized as comment.
-        self.assertEquals(1, cpp_style.find_next_multi_line_comment_start(lines, 0))
+        self.assertEqual(1, cpp_style.find_next_multi_line_comment_start(lines, 0))
 
     def test_find_next_multi_line_comment_end(self):
-        self.assertEquals(1, cpp_style.find_next_multi_line_comment_end([''], 0))
+        self.assertEqual(1, cpp_style.find_next_multi_line_comment_end([''], 0))
         lines = ['a', 'b', ' c */']
-        self.assertEquals(2, cpp_style.find_next_multi_line_comment_end(lines, 0))
+        self.assertEqual(2, cpp_style.find_next_multi_line_comment_end(lines, 0))
 
     def test_remove_multi_line_comments_from_range(self):
         lines = ['a', '  /* comment ', ' * still comment', ' comment */   ', 'b']
         cpp_style.remove_multi_line_comments_from_range(lines, 1, 4)
-        self.assertEquals(['a', '// dummy', '// dummy', '// dummy', 'b'], lines)
+        self.assertEqual(['a', '// dummy', '// dummy', '// dummy', 'b'], lines)
 
     def test_position(self):
         position = cpp_style.Position(3, 4)
         self.assert_positions_equal(position, (3, 4))
-        self.assertEquals(position.row, 3)
+        self.assertEqual(position.row, 3)
         self.assertTrue(position > cpp_style.Position(position.row - 1, position.column + 1))
         self.assertTrue(position > cpp_style.Position(position.row, position.column - 1))
         self.assertTrue(position < cpp_style.Position(position.row, position.column + 1))
         self.assertTrue(position < cpp_style.Position(position.row + 1, position.column - 1))
-        self.assertEquals(position.__str__(), '(3, 4)')
+        self.assertEqual(position.__str__(), '(3, 4)')
 
     def test_rfind_in_lines(self):
         not_found_position = cpp_style.Position(10, 11)
         start_position = cpp_style.Position(2, 2)
         lines = ['ab', 'ace', 'test']
-        self.assertEquals(not_found_position, cpp_style._rfind_in_lines('st', lines, start_position, not_found_position))
+        self.assertEqual(not_found_position, cpp_style._rfind_in_lines('st', lines, start_position, not_found_position))
         self.assertTrue(cpp_style.Position(1, 1) == cpp_style._rfind_in_lines('a', lines, start_position, not_found_position))
-        self.assertEquals(cpp_style.Position(2, 2), cpp_style._rfind_in_lines('(te|a)', lines, start_position, not_found_position))
+        self.assertEqual(cpp_style.Position(2, 2), cpp_style._rfind_in_lines('(te|a)', lines, start_position, not_found_position))
 
     def test_close_expression(self):
-        self.assertEquals(cpp_style.Position(1, -1), cpp_style.close_expression([')('], cpp_style.Position(0, 1)))
-        self.assertEquals(cpp_style.Position(1, -1), cpp_style.close_expression([') ()'], cpp_style.Position(0, 1)))
-        self.assertEquals(cpp_style.Position(0, 4), cpp_style.close_expression([')[)]'], cpp_style.Position(0, 1)))
-        self.assertEquals(cpp_style.Position(0, 5), cpp_style.close_expression(['}{}{}'], cpp_style.Position(0, 3)))
-        self.assertEquals(cpp_style.Position(1, 1), cpp_style.close_expression(['}{}{', '}'], cpp_style.Position(0, 3)))
-        self.assertEquals(cpp_style.Position(2, -1), cpp_style.close_expression(['][][', ' '], cpp_style.Position(0, 3)))
+        self.assertEqual(cpp_style.Position(1, -1), cpp_style.close_expression([')('], cpp_style.Position(0, 1)))
+        self.assertEqual(cpp_style.Position(1, -1), cpp_style.close_expression([') ()'], cpp_style.Position(0, 1)))
+        self.assertEqual(cpp_style.Position(0, 4), cpp_style.close_expression([')[)]'], cpp_style.Position(0, 1)))
+        self.assertEqual(cpp_style.Position(0, 5), cpp_style.close_expression(['}{}{}'], cpp_style.Position(0, 3)))
+        self.assertEqual(cpp_style.Position(1, 1), cpp_style.close_expression(['}{}{', '}'], cpp_style.Position(0, 3)))
+        self.assertEqual(cpp_style.Position(2, -1), cpp_style.close_expression(['][][', ' '], cpp_style.Position(0, 3)))
 
     def test_spaces_at_end_of_line(self):
         self.assert_lint(
@@ -864,10 +864,10 @@ class CppStyleTest(CppStyleTestBase):
 
     def test_include_what_you_use_no_implementation_files(self):
         code = 'std::vector<int> foo;'
-        self.assertEquals('Add #include <vector> for vector<>'
+        self.assertEqual('Add #include <vector> for vector<>'
                           '  [build/include_what_you_use] [4]',
                           self.perform_include_what_you_use(code, 'foo.h'))
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_include_what_you_use(code, 'foo.cpp'))
 
     def test_include_what_you_use(self):
@@ -1003,7 +1003,7 @@ class CppStyleTest(CppStyleTestBase):
             '#include "blah/a.h"\n',
             filename='blah/a.cpp',
             io=MockIo(mock_header_contents))
-        self.assertEquals(message, '')
+        self.assertEqual(message, '')
 
         mock_header_contents = ['#include <set>']
         message = self.perform_include_what_you_use(
@@ -1013,7 +1013,7 @@ class CppStyleTest(CppStyleTestBase):
                std::set<int> foo;''',
             filename='blah/a.cpp',
             io=MockIo(mock_header_contents))
-        self.assertEquals(message, '')
+        self.assertEqual(message, '')
 
         # If there's just a .cpp and the header can't be found then it's ok.
         message = self.perform_include_what_you_use(
@@ -1022,7 +1022,7 @@ class CppStyleTest(CppStyleTestBase):
 
                std::set<int> foo;''',
             filename='blah/a.cpp')
-        self.assertEquals(message, '')
+        self.assertEqual(message, '')
 
         # Make sure we find the headers with relative paths.
         mock_header_contents = ['']
@@ -1033,40 +1033,40 @@ class CppStyleTest(CppStyleTestBase):
                std::set<int> foo;''' % (os.path.basename(os.getcwd()), os.path.sep),
             filename='a.cpp',
             io=MockIo(mock_header_contents))
-        self.assertEquals(message, 'Add #include <set> for set<>  '
+        self.assertEqual(message, 'Add #include <set> for set<>  '
                                    '[build/include_what_you_use] [4]')
 
     def test_files_belong_to_same_module(self):
         f = cpp_style.files_belong_to_same_module
-        self.assertEquals((True, ''), f('a.cpp', 'a.h'))
-        self.assertEquals((True, ''), f('base/google.cpp', 'base/google.h'))
-        self.assertEquals((True, ''), f('base/google_test.cpp', 'base/google.h'))
-        self.assertEquals((True, ''),
+        self.assertEqual((True, ''), f('a.cpp', 'a.h'))
+        self.assertEqual((True, ''), f('base/google.cpp', 'base/google.h'))
+        self.assertEqual((True, ''), f('base/google_test.cpp', 'base/google.h'))
+        self.assertEqual((True, ''),
                           f('base/google_unittest.cpp', 'base/google.h'))
-        self.assertEquals((True, ''),
+        self.assertEqual((True, ''),
                           f('base/internal/google_unittest.cpp',
                             'base/public/google.h'))
-        self.assertEquals((True, 'xxx/yyy/'),
+        self.assertEqual((True, 'xxx/yyy/'),
                           f('xxx/yyy/base/internal/google_unittest.cpp',
                             'base/public/google.h'))
-        self.assertEquals((True, 'xxx/yyy/'),
+        self.assertEqual((True, 'xxx/yyy/'),
                           f('xxx/yyy/base/google_unittest.cpp',
                             'base/public/google.h'))
-        self.assertEquals((True, ''),
+        self.assertEqual((True, ''),
                           f('base/google_unittest.cpp', 'base/google-inl.h'))
-        self.assertEquals((True, '/home/build/google3/'),
+        self.assertEqual((True, '/home/build/google3/'),
                           f('/home/build/google3/base/google.cpp', 'base/google.h'))
 
-        self.assertEquals((False, ''),
+        self.assertEqual((False, ''),
                           f('/home/build/google3/base/google.cpp', 'basu/google.h'))
-        self.assertEquals((False, ''), f('a.cpp', 'b.h'))
+        self.assertEqual((False, ''), f('a.cpp', 'b.h'))
 
     def test_cleanse_line(self):
-        self.assertEquals('int foo = 0;  ',
+        self.assertEqual('int foo = 0;  ',
                           cpp_style.cleanse_comments('int foo = 0;  // danger!'))
-        self.assertEquals('int o = 0;',
+        self.assertEqual('int o = 0;',
                           cpp_style.cleanse_comments('int /* foo */ o = 0;'))
-        self.assertEquals('foo(int a, int b);',
+        self.assertEqual('foo(int a, int b);',
                           cpp_style.cleanse_comments('foo(int a /* abc */, int b);'))
         self.assertEqual('f(a, b);',
                          cpp_style.cleanse_comments('f(a, /* name */ b);'))
@@ -1113,12 +1113,12 @@ class CppStyleTest(CppStyleTestBase):
 
         file_path = 'mydir/foo.cpp'
 
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'cpp',
                                ['const char* str = "This is a\\',
                                 ' multiline string.";'],
                                error_collector)
-        self.assertEquals(
+        self.assertEqual(
             2,  # One per line.
             error_collector.result_list().count(multiline_string_error_message))
 
@@ -1902,11 +1902,11 @@ class CppStyleTest(CppStyleTestBase):
 
     def test_newline_at_eof(self):
         def do_test(self, data, is_missing_eof):
-            error_collector = ErrorCollector(self.assert_)
+            error_collector = ErrorCollector(self.assertTrue)
             self.process_file_data('foo.cpp', 'cpp', data.split('\n'),
                                    error_collector)
             # The warning appears only once.
-            self.assertEquals(
+            self.assertEqual(
                 int(is_missing_eof),
                 error_collector.results().count(
                     'Could not find a newline character at the end of the file.'
@@ -1917,12 +1917,12 @@ class CppStyleTest(CppStyleTestBase):
 
     def test_invalid_utf8(self):
         def do_test(self, raw_bytes, has_invalid_utf8):
-            error_collector = ErrorCollector(self.assert_)
+            error_collector = ErrorCollector(self.assertTrue)
             self.process_file_data('foo.cpp', 'cpp',
                                    unicode(raw_bytes, 'utf8', 'replace').split('\n'),
                                    error_collector)
             # The warning appears only once.
-            self.assertEquals(
+            self.assertEqual(
                 int(has_invalid_utf8),
                 error_collector.results().count(
                     'Line contains invalid UTF-8'
@@ -1937,11 +1937,11 @@ class CppStyleTest(CppStyleTestBase):
         do_test(self, '\xef\xbf\xbd\n', True)
 
     def test_is_blank_line(self):
-        self.assert_(cpp_style.is_blank_line(''))
-        self.assert_(cpp_style.is_blank_line(' '))
-        self.assert_(cpp_style.is_blank_line(' \t\r\n'))
-        self.assert_(not cpp_style.is_blank_line('int a;'))
-        self.assert_(not cpp_style.is_blank_line('{'))
+        self.assertTrue(cpp_style.is_blank_line(''))
+        self.assertTrue(cpp_style.is_blank_line(' '))
+        self.assertTrue(cpp_style.is_blank_line(' \t\r\n'))
+        self.assertTrue(not cpp_style.is_blank_line('int a;'))
+        self.assertTrue(not cpp_style.is_blank_line('{'))
 
     def test_blank_lines_check(self):
         self.assert_blank_lines_check(['{\n', '\n', '\n', '}\n'], 1, 1)
@@ -1952,16 +1952,16 @@ class CppStyleTest(CppStyleTestBase):
         self.assert_blank_lines_check(['\n', '  if (foo) { return 0; }\n', '\n'], 0, 0)
 
     def test_allow_blank_line_before_closing_namespace(self):
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data('foo.cpp', 'cpp',
                                ['namespace {', '', '}  // namespace'],
                                error_collector)
-        self.assertEquals(0, error_collector.results().count(
+        self.assertEqual(0, error_collector.results().count(
             'Blank line at the end of a code block.  Is this needed?'
             '  [whitespace/blank_line] [3]'))
 
     def test_allow_blank_line_before_if_else_chain(self):
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data('foo.cpp', 'cpp',
                                ['if (hoge) {',
                                 '',  # No warning
@@ -1973,12 +1973,12 @@ class CppStyleTest(CppStyleTestBase):
                                 '',  # Warning on this line
                                 '}'],
                                error_collector)
-        self.assertEquals(1, error_collector.results().count(
+        self.assertEqual(1, error_collector.results().count(
             'Blank line at the end of a code block.  Is this needed?'
             '  [whitespace/blank_line] [3]'))
 
     def test_else_on_same_line_as_closing_braces(self):
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data('foo.cpp', 'cpp',
                                ['if (hoge) {',
                                 '',
@@ -1987,7 +1987,7 @@ class CppStyleTest(CppStyleTestBase):
                                 '',
                                 '}'],
                                error_collector)
-        self.assertEquals(1, error_collector.results().count(
+        self.assertEqual(1, error_collector.results().count(
             'An else should appear on the same line as the preceding }'
             '  [whitespace/newline] [4]'))
 
@@ -2144,7 +2144,7 @@ class CppStyleTest(CppStyleTestBase):
         # side of things, so just parse out the suggested header guard. This
         # doesn't allow us to test the suggested header guard, but it does let us
         # test all the other header tests.
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'h', [], error_collector)
         expected_guard = ''
         matcher = re.compile(
@@ -2159,10 +2159,10 @@ class CppStyleTest(CppStyleTestBase):
         self.assertNotEqual(expected_guard, '')
 
         # Wrong guard
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'h',
                                ['#ifndef FOO_H', '#define FOO_H'], error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(
                 '#ifndef header guard has wrong style, please use: %s'
@@ -2170,10 +2170,10 @@ class CppStyleTest(CppStyleTestBase):
             error_collector.result_list())
 
         # No define
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'h',
                                ['#ifndef %s' % expected_guard], error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(
                 'No #ifndef header guard found, suggested CPP variable is: %s'
@@ -2181,12 +2181,12 @@ class CppStyleTest(CppStyleTestBase):
             error_collector.result_list())
 
         # Mismatched define
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'h',
                                ['#ifndef %s' % expected_guard,
                                 '#define FOO_H'],
                                error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(
                 'No #ifndef header guard found, suggested CPP variable is: %s'
@@ -2194,7 +2194,7 @@ class CppStyleTest(CppStyleTestBase):
             error_collector.result_list())
 
         # No header guard errors
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'h',
                                ['#ifndef %s' % expected_guard,
                                 '#define %s' % expected_guard,
@@ -2205,13 +2205,13 @@ class CppStyleTest(CppStyleTestBase):
                 self.fail('Unexpected error: %s' % line)
 
         # Completely incorrect header guard
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'h',
                                ['#ifndef FOO',
                                 '#define FOO',
                                 '#endif  // FOO'],
                                error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(
                 '#ifndef header guard has wrong style, please use: %s'
@@ -2219,7 +2219,7 @@ class CppStyleTest(CppStyleTestBase):
             error_collector.result_list())
 
         # Special case for flymake
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data('mydir/Foo_flymake.h', 'h',
                                ['#ifndef %s' % expected_guard,
                                 '#define %s' % expected_guard,
@@ -2229,9 +2229,9 @@ class CppStyleTest(CppStyleTestBase):
             if line.find('build/header_guard') != -1:
                 self.fail('Unexpected error: %s' % line)
 
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data('mydir/Foo_flymake.h', 'h', [], error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(
                 'No #ifndef header guard found, suggested CPP variable is: %s'
@@ -2243,27 +2243,27 @@ class CppStyleTest(CppStyleTestBase):
 
         # Allow the WTF_ prefix for files in that directory.
         header_guard_filter = FilterConfiguration(('-', '+build/header_guard'))
-        error_collector = ErrorCollector(self.assert_, header_guard_filter)
+        error_collector = ErrorCollector(self.assertTrue, header_guard_filter)
         self.process_file_data('Source/JavaScriptCore/wtf/TestName.h', 'h',
                                ['#ifndef WTF_TestName_h', '#define WTF_TestName_h'],
                                error_collector)
-        self.assertEquals(0, len(error_collector.result_list()),
+        self.assertEqual(0, len(error_collector.result_list()),
                           error_collector.result_list())
 
         # Also allow the non WTF_ prefix for files in that directory.
-        error_collector = ErrorCollector(self.assert_, header_guard_filter)
+        error_collector = ErrorCollector(self.assertTrue, header_guard_filter)
         self.process_file_data('Source/JavaScriptCore/wtf/TestName.h', 'h',
                                ['#ifndef TestName_h', '#define TestName_h'],
                                error_collector)
-        self.assertEquals(0, len(error_collector.result_list()),
+        self.assertEqual(0, len(error_collector.result_list()),
                           error_collector.result_list())
 
         # Verify that we suggest the WTF prefix version.
-        error_collector = ErrorCollector(self.assert_, header_guard_filter)
+        error_collector = ErrorCollector(self.assertTrue, header_guard_filter)
         self.process_file_data('Source/JavaScriptCore/wtf/TestName.h', 'h',
                                ['#ifndef BAD_TestName_h', '#define BAD_TestName_h'],
                                error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(
                 '#ifndef header guard has wrong style, please use: WTF_TestName_h'
@@ -2403,29 +2403,29 @@ class CppStyleTest(CppStyleTestBase):
         file_path = 'mydir/googleclient/foo.cpp'
 
         # There should be a copyright message in the first 10 lines
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'cpp', [], error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(legal_copyright_message))
 
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(
             file_path, 'cpp',
             ['' for unused_i in range(10)] + [copyright_line],
             error_collector)
-        self.assertEquals(
+        self.assertEqual(
             1,
             error_collector.result_list().count(legal_copyright_message))
 
         # Test that warning isn't issued if Copyright line appears early enough.
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(file_path, 'cpp', [copyright_line], error_collector)
         for message in error_collector.result_list():
             if message.find('legal/copyright') != -1:
                 self.fail('Unexpected error: %s' % message)
 
-        error_collector = ErrorCollector(self.assert_)
+        error_collector = ErrorCollector(self.assertTrue)
         self.process_file_data(
             file_path, 'cpp',
             ['' for unused_i in range(9)] + [copyright_line],
@@ -2457,16 +2457,16 @@ class CleansedLinesTest(unittest.TestCase):
                  'Line 4 "foo"']
 
         clean_lines = cpp_style.CleansedLines(lines)
-        self.assertEquals(lines, clean_lines.raw_lines)
-        self.assertEquals(4, clean_lines.num_lines())
+        self.assertEqual(lines, clean_lines.raw_lines)
+        self.assertEqual(4, clean_lines.num_lines())
 
-        self.assertEquals(['Line 1',
+        self.assertEqual(['Line 1',
                            'Line 2',
                            'Line 3 ',
                            'Line 4 "foo"'],
                           clean_lines.lines)
 
-        self.assertEquals(['Line 1',
+        self.assertEqual(['Line 1',
                            'Line 2',
                            'Line 3 ',
                            'Line 4 ""'],
@@ -2474,33 +2474,33 @@ class CleansedLinesTest(unittest.TestCase):
 
     def test_init_empty(self):
         clean_lines = cpp_style.CleansedLines([])
-        self.assertEquals([], clean_lines.raw_lines)
-        self.assertEquals(0, clean_lines.num_lines())
+        self.assertEqual([], clean_lines.raw_lines)
+        self.assertEqual(0, clean_lines.num_lines())
 
     def test_collapse_strings(self):
         collapse = cpp_style.CleansedLines.collapse_strings
-        self.assertEquals('""', collapse('""'))             # ""     (empty)
-        self.assertEquals('"""', collapse('"""'))           # """    (bad)
-        self.assertEquals('""', collapse('"xyz"'))          # "xyz"  (string)
-        self.assertEquals('""', collapse('"\\\""'))         # "\""   (string)
-        self.assertEquals('""', collapse('"\'"'))           # "'"    (string)
-        self.assertEquals('"\"', collapse('"\"'))           # "\"    (bad)
-        self.assertEquals('""', collapse('"\\\\"'))         # "\\"   (string)
-        self.assertEquals('"', collapse('"\\\\\\"'))        # "\\\"  (bad)
-        self.assertEquals('""', collapse('"\\\\\\\\"'))     # "\\\\" (string)
-
-        self.assertEquals('\'\'', collapse('\'\''))         # ''     (empty)
-        self.assertEquals('\'\'', collapse('\'a\''))        # 'a'    (char)
-        self.assertEquals('\'\'', collapse('\'\\\'\''))     # '\''   (char)
-        self.assertEquals('\'', collapse('\'\\\''))         # '\'    (bad)
-        self.assertEquals('', collapse('\\012'))            # '\012' (char)
-        self.assertEquals('', collapse('\\xfF0'))           # '\xfF0' (char)
-        self.assertEquals('', collapse('\\n'))              # '\n' (char)
-        self.assertEquals('\#', collapse('\\#'))            # '\#' (bad)
-
-        self.assertEquals('StringReplace(body, "", "");',
+        self.assertEqual('""', collapse('""'))             # ""     (empty)
+        self.assertEqual('"""', collapse('"""'))           # """    (bad)
+        self.assertEqual('""', collapse('"xyz"'))          # "xyz"  (string)
+        self.assertEqual('""', collapse('"\\\""'))         # "\""   (string)
+        self.assertEqual('""', collapse('"\'"'))           # "'"    (string)
+        self.assertEqual('"\"', collapse('"\"'))           # "\"    (bad)
+        self.assertEqual('""', collapse('"\\\\"'))         # "\\"   (string)
+        self.assertEqual('"', collapse('"\\\\\\"'))        # "\\\"  (bad)
+        self.assertEqual('""', collapse('"\\\\\\\\"'))     # "\\\\" (string)
+
+        self.assertEqual('\'\'', collapse('\'\''))         # ''     (empty)
+        self.assertEqual('\'\'', collapse('\'a\''))        # 'a'    (char)
+        self.assertEqual('\'\'', collapse('\'\\\'\''))     # '\''   (char)
+        self.assertEqual('\'', collapse('\'\\\''))         # '\'    (bad)
+        self.assertEqual('', collapse('\\012'))            # '\012' (char)
+        self.assertEqual('', collapse('\\xfF0'))           # '\xfF0' (char)
+        self.assertEqual('', collapse('\\n'))              # '\n' (char)
+        self.assertEqual('\#', collapse('\\#'))            # '\#' (bad)
+
+        self.assertEqual('StringReplace(body, "", "");',
                           collapse('StringReplace(body, "\\\\", "\\\\\\\\");'))
-        self.assertEquals('\'\' ""',
+        self.assertEqual('\'\' ""',
                           collapse('\'"\' "foo"'))
 
 
@@ -2890,7 +2890,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
           code: C++ source code expected to generate a warning message.
           expected_message: Message expected to be generated by the C++ code.
         """
-        self.assertEquals(expected_message,
+        self.assertEqual(expected_message,
                           self.perform_function_lengths_check(code))
 
     def trigger_lines(self, error_level):
@@ -3346,7 +3346,7 @@ class PassPtrTest(CppStyleTestBase):
           code: C++ source code expected to generate a warning message.
           expected_message: Message expected to be generated by the C++ code.
         """
-        self.assertEquals(expected_message,
+        self.assertEqual(expected_message,
                           self.perform_pass_ptr_check(code))
 
     def test_pass_ref_ptr_in_function(self):
@@ -3461,7 +3461,7 @@ class LeakyPatternTest(CppStyleTestBase):
           code: C++ source code expected to generate a warning message.
           expected_message: Message expected to be generated by the C++ code.
         """
-        self.assertEquals(expected_message,
+        self.assertEqual(expected_message,
                           self.perform_leaky_pattern_check(code))
 
     def test_get_dc(self):
@@ -4688,45 +4688,45 @@ class WebKitStyleTest(CppStyleTestBase):
         parameter_error_rules = ('-',
                                  '+readability/parameter_name')
         # No variable name, so no error.
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('void func(int);', 'test.cpp', parameter_error_rules))
 
         # Verify that copying the name of the set function causes the error (with some odd casing).
-        self.assertEquals(meaningless_variable_name_error_message % 'itemCount',
+        self.assertEqual(meaningless_variable_name_error_message % 'itemCount',
                           self.perform_lint('void setItemCount(size_t itemCount);', 'test.cpp', parameter_error_rules))
-        self.assertEquals(meaningless_variable_name_error_message % 'abcCount',
+        self.assertEqual(meaningless_variable_name_error_message % 'abcCount',
                           self.perform_lint('void setABCCount(size_t abcCount);', 'test.cpp', parameter_error_rules))
 
         # Verify that copying a type name will trigger the warning (even if the type is a template parameter).
-        self.assertEquals(meaningless_variable_name_error_message % 'context',
+        self.assertEqual(meaningless_variable_name_error_message % 'context',
                           self.perform_lint('void funct(PassRefPtr<ScriptExecutionContext> context);', 'test.cpp', parameter_error_rules))
 
         # Verify that acronyms as variable names trigger the error (for both set functions and type names).
-        self.assertEquals(meaningless_variable_name_error_message % 'ec',
+        self.assertEqual(meaningless_variable_name_error_message % 'ec',
                           self.perform_lint('void setExceptionCode(int ec);', 'test.cpp', parameter_error_rules))
-        self.assertEquals(meaningless_variable_name_error_message % 'ec',
+        self.assertEqual(meaningless_variable_name_error_message % 'ec',
                           self.perform_lint('void funct(ExceptionCode ec);', 'test.cpp', parameter_error_rules))
 
         # 'object' alone, appended, or as part of an acronym is meaningless.
-        self.assertEquals(meaningless_variable_name_error_message % 'object',
+        self.assertEqual(meaningless_variable_name_error_message % 'object',
                           self.perform_lint('void funct(RenderView object);', 'test.cpp', parameter_error_rules))
-        self.assertEquals(meaningless_variable_name_error_message % 'viewObject',
+        self.assertEqual(meaningless_variable_name_error_message % 'viewObject',
                           self.perform_lint('void funct(RenderView viewObject);', 'test.cpp', parameter_error_rules))
-        self.assertEquals(meaningless_variable_name_error_message % 'rvo',
+        self.assertEqual(meaningless_variable_name_error_message % 'rvo',
                           self.perform_lint('void funct(RenderView rvo);', 'test.cpp', parameter_error_rules))
 
         # Check that r, g, b, and a are allowed.
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('void setRGBAValues(int r, int g, int b, int a);', 'test.cpp', parameter_error_rules))
 
         # Verify that a simple substring match isn't done which would cause false positives.
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('void setNateLateCount(size_t elate);', 'test.cpp', parameter_error_rules))
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('void funct(NateLate elate);', 'test.cpp', parameter_error_rules))
 
         # Don't have generate warnings for functions (only declarations).
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('void funct(PassRefPtr<ScriptExecutionContext> context)\n'
                                             '{\n'
                                             '}\n', 'test.cpp', parameter_error_rules))
@@ -4743,33 +4743,33 @@ class WebKitStyleTest(CppStyleTestBase):
     def test_webkit_export_check(self):
         webkit_export_error_rules = ('-',
                                   '+readability/webkit_export')
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
                                             'WebKit/chromium/public/test.h',
                                             webkit_export_error_rules))
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
                                             'WebKit/chromium/tests/test.h',
                                             webkit_export_error_rules))
-        self.assertEquals('WEBKIT_EXPORT should only be used in header files.  [readability/webkit_export] [5]',
+        self.assertEqual('WEBKIT_EXPORT should only be used in header files.  [readability/webkit_export] [5]',
                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
                                             'WebKit/chromium/public/test.cpp',
                                             webkit_export_error_rules))
-        self.assertEquals('WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.  [readability/webkit_export] [5]',
+        self.assertEqual('WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.  [readability/webkit_export] [5]',
                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
                                             'WebKit/chromium/src/test.h',
                                             webkit_export_error_rules))
-        self.assertEquals('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
+        self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
                           self.perform_lint('WEBKIT_EXPORT int foo() { }\n',
                                             'WebKit/chromium/public/test.h',
                                             webkit_export_error_rules))
-        self.assertEquals('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
+        self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
                           self.perform_lint('WEBKIT_EXPORT inline int foo()\n'
                                             '{\n'
                                             '}\n',
                                             'WebKit/chromium/public/test.h',
                                             webkit_export_error_rules))
-        self.assertEquals('WEBKIT_EXPORT should not be used with a pure virtual function.  [readability/webkit_export] [5]',
+        self.assertEqual('WEBKIT_EXPORT should not be used with a pure virtual function.  [readability/webkit_export] [5]',
                           self.perform_lint('{}\n'
                                             'WEBKIT_EXPORT\n'
                                             'virtual\n'
@@ -4777,7 +4777,7 @@ class WebKitStyleTest(CppStyleTestBase):
                                             'foo() = 0;\n',
                                             'WebKit/chromium/public/test.h',
                                             webkit_export_error_rules))
-        self.assertEquals('',
+        self.assertEqual('',
                           self.perform_lint('{}\n'
                                             'WEBKIT_EXPORT\n'
                                             'virtual\n'
@@ -4804,10 +4804,10 @@ class CppCheckerTest(unittest.TestCase):
     def test_init(self):
         """Test __init__ constructor."""
         checker = self._checker()
-        self.assertEquals(checker.file_extension, "h")
-        self.assertEquals(checker.file_path, "foo")
-        self.assertEquals(checker.handle_style_error, self.mock_handle_style_error)
-        self.assertEquals(checker.min_confidence, 3)
+        self.assertEqual(checker.file_extension, "h")
+        self.assertEqual(checker.file_path, "foo")
+        self.assertEqual(checker.handle_style_error, self.mock_handle_style_error)
+        self.assertEqual(checker.min_confidence, 3)
 
     def test_eq(self):
         """Test __eq__ equality function."""
index 973c673..e7fbbb4 100755 (executable)
@@ -67,8 +67,8 @@ class JSONCheckerTest(unittest.TestCase):
     def assert_error(self, expected_line_number, expected_category, json_data):
         def handle_style_error(mock_error_handler, line_number, category, confidence, message):
             mock_error_handler.had_error = True
-            self.assertEquals(expected_line_number,&nbs