Skip to content

Commit 463617e

Browse files
authored
test: remove usage of deprecated method TestCase.assertEquals (bazel-contrib#1494)
`TestCase.assertEquals` is an alias for `TestCase.assertEqual`. [This method is deprecated since Python 3.2 and was removed in Python 3.12](https://docs.python.org/3/whatsnew/3.12.html#id3).
1 parent e3a93f3 commit 463617e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/bzlmod/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_coverage_sys_path(self):
7676
)
7777

7878
def test_main(self):
79-
self.assertEquals(
79+
self.assertEqual(
8080
"""\
8181
- -
8282
A 1

examples/bzlmod_build_file_generation/__test__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class ExampleTest(unittest.TestCase):
2121
def test_main(self):
22-
self.assertEquals(
22+
self.assertEqual(
2323
"""\
2424
- -
2525
A 1

examples/wheel/wheel_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def test_legacy_filename_escaping(self):
198198
)
199199
with zipfile.ZipFile(filename) as zf:
200200
self.assertAllEntriesHasReproducibleMetadata(zf)
201-
self.assertEquals(
201+
self.assertEqual(
202202
zf.namelist(),
203203
[
204204
"examples/wheel/lib/data.txt",
@@ -216,7 +216,7 @@ def test_legacy_filename_escaping(self):
216216
metadata_contents = zf.read(
217217
"file_name_escaping-0.0.1_r7.dist-info/METADATA"
218218
)
219-
self.assertEquals(
219+
self.assertEqual(
220220
metadata_contents,
221221
b"""\
222222
Metadata-Version: 2.1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy