summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarthikeyan Singaravelan <tir.karthi@gmail.com>2021-04-14 11:45:22 (GMT)
committerGitHub <noreply@github.com>2021-04-14 11:45:22 (GMT)
commitb8509ffa82d393d9d4a0f5520edca057978bbd86 (patch)
tree9d345266cd329eb245674757b1a39429c7268737
parent6f1e8ccffa5b1272a36a35405d3c4e4bbba0c082 (diff)
downloadcpython-b8509ffa82d393d9d4a0f5520edca057978bbd86.zip
cpython-b8509ffa82d393d9d4a0f5520edca057978bbd86.tar.gz
cpython-b8509ffa82d393d9d4a0f5520edca057978bbd86.tar.bz2
bpo-43825: Fix deprecation warnings in test_cmd_line and test_collections (GH-25380)
* Fix deprecation warnings due to invalid escape sequences. * Use self.assertEqual instead of deprecated self.assertEquals.
-rw-r--r--Lib/test/test_cmd_line.py2
-rw-r--r--Lib/test/test_collections.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index 3758767..cbf9ff2 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -862,7 +862,7 @@ class SyntaxErrorTests(unittest.TestCase):
self.check_string(b"(1+2+3")
def test_decoding_error_at_the_end_of_the_line(self):
- self.check_string(b"'\u1f'")
+ self.check_string(br"'\u1f'")
def test_main():
support.run_unittest(CmdLineTest, IgnoreEnvironmentTest, SyntaxErrorTests)
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 7b245c0..98690d2 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -1515,7 +1515,7 @@ class TestCollectionABCs(ABCTestCase):
items = [5,43,2,1]
s = MySet(items)
r = s.pop()
- self.assertEquals(len(s), len(items) - 1)
+ self.assertEqual(len(s), len(items) - 1)
self.assertNotIn(r, s)
self.assertIn(r, items)