From 8e3e8f65c423e194a9aac7cee21e57b70c015bba Mon Sep 17 00:00:00 2001 From: Beverly <1618914+bev-a-tron@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:45:32 -0700 Subject: [PATCH] Update deprecated assertEquals to assertEqual --- koans/about_iteration.py | 2 +- koans/about_regex.py | 6 +++--- runner/runner_tests/test_helper.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koans/about_iteration.py b/koans/about_iteration.py index 1faca8e33..a7f369d92 100644 --- a/koans/about_iteration.py +++ b/koans/about_iteration.py @@ -80,7 +80,7 @@ def is_big_name(item): except StopIteration: msg = 'Ran out of big names' - self.assertEquals(__, msg) + self.assertEqual(__, msg) # ------------------------------------------------------------------ diff --git a/koans/about_regex.py b/koans/about_regex.py index f562594e5..f99f30879 100644 --- a/koans/about_regex.py +++ b/koans/about_regex.py @@ -82,7 +82,7 @@ def test_matching_any_character(self): # I want to find all uses of myArray change_this_search_string = 'a..xlx' - self.assertEquals( + self.assertEqual( len(re.findall(change_this_search_string, string)), 3) @@ -108,7 +108,7 @@ def test_matching_set_character(self): # which matches in above test but in this case matches more than # you want change_this_search_string = '[nsc]a[2-9].xls' - self.assertEquals( + self.assertEqual( len(re.findall(change_this_search_string, string)), 3) @@ -135,6 +135,6 @@ def test_anything_but_matching(self): # I want to find the name 'sam' change_this_search_string = '[^nc]am' - self.assertEquals( + self.assertEqual( re.findall(change_this_search_string, string), ['sam.xls']) diff --git a/runner/runner_tests/test_helper.py b/runner/runner_tests/test_helper.py index fef9b6026..661d36e4b 100644 --- a/runner/runner_tests/test_helper.py +++ b/runner/runner_tests/test_helper.py @@ -11,7 +11,7 @@ def test_that_get_class_name_works_with_a_string_instance(self): self.assertEqual("str", helper.cls_name(str())) def test_that_get_class_name_works_with_a_4(self): - self.assertEquals("int", helper.cls_name(4)) + self.assertEqual("int", helper.cls_name(4)) def test_that_get_class_name_works_with_a_tuple(self): - self.assertEquals("tuple", helper.cls_name((3,"pie", []))) + self.assertEqual("tuple", helper.cls_name((3,"pie", [])))