Skip to content

Commit

Permalink
bpo-43825: Fix deprecation warnings in test_cmd_line and test_collect…
Browse files Browse the repository at this point in the history
…ions (pythonGH-25380)

* Fix deprecation warnings due to invalid escape sequences.
* Use self.assertEqual instead of deprecated self.assertEquals.
  • Loading branch information
tirkarthi authored Apr 14, 2021
1 parent 6f1e8cc commit b8509ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_cmd_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def test_tokenizer_error_with_stdin(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ def __repr__(self):
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)

Expand Down

0 comments on commit b8509ff

Please sign in to comment.