mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
6f1e8ccffa
commit
b8509ffa82
2 changed files with 2 additions and 2 deletions
|
@ -862,7 +862,7 @@ class SyntaxErrorTests(unittest.TestCase):
|
||||||
self.check_string(b"(1+2+3")
|
self.check_string(b"(1+2+3")
|
||||||
|
|
||||||
def test_decoding_error_at_the_end_of_the_line(self):
|
def test_decoding_error_at_the_end_of_the_line(self):
|
||||||
self.check_string(b"'\u1f'")
|
self.check_string(br"'\u1f'")
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
support.run_unittest(CmdLineTest, IgnoreEnvironmentTest, SyntaxErrorTests)
|
support.run_unittest(CmdLineTest, IgnoreEnvironmentTest, SyntaxErrorTests)
|
||||||
|
|
|
@ -1515,7 +1515,7 @@ class TestCollectionABCs(ABCTestCase):
|
||||||
items = [5,43,2,1]
|
items = [5,43,2,1]
|
||||||
s = MySet(items)
|
s = MySet(items)
|
||||||
r = s.pop()
|
r = s.pop()
|
||||||
self.assertEquals(len(s), len(items) - 1)
|
self.assertEqual(len(s), len(items) - 1)
|
||||||
self.assertNotIn(r, s)
|
self.assertNotIn(r, s)
|
||||||
self.assertIn(r, items)
|
self.assertIn(r, items)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue