diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-01-31 07:41:50 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-01-31 09:20:43 -0500 |
commit | 6e93714d655c87e62cd03a4ff3e1739245b684b9 (patch) | |
tree | b9a5535ad9388c7bb20c57a4053ecf725267a7a5 /tests/test_backward.py | |
parent | 843de4ea235e7eee3ff24a39a2f8b14da9ef0db0 (diff) | |
download | python-coveragepy-git-6e93714d655c87e62cd03a4ff3e1739245b684b9.tar.gz |
test: fix unittest2pytest brokenness
unittest2pytest created syntax errors, reported here:
https://github.com/pytest-dev/unittest2pytest/issues/51
This commit fixes them back.
Diffstat (limited to 'tests/test_backward.py')
-rw-r--r-- | tests/test_backward.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/test_backward.py b/tests/test_backward.py index 01cc8dac..767a7ac8 100644 --- a/tests/test_backward.py +++ b/tests/test_backward.py @@ -5,14 +5,17 @@ from coverage.backunittest import TestCase from coverage.backward import iitems, binary_bytes, bytes_to_ints -"""Tests of things from backward.py.""" -deftest_iitems(self): - d = {'a': 1, 'b': 2, 'c': 3} - items = [('a', 1), ('b', 2), ('c', 3)] - self.assertCountEqual(list(iitems(d)), items) + +class BackwardTest(TestCase): + """Tests of things from backward.py.""" + + def test_iitems(self): + d = {'a': 1, 'b': 2, 'c': 3} + items = [('a', 1), ('b', 2), ('c', 3)] + self.assertCountEqual(list(iitems(d)), items) def test_binary_bytes(self): - byte_values = [0, 255, 17, 23, 42, 57] - bb = binary_bytes(byte_values) - assert len(bb) == len(byte_values) - assert byte_values == list(bytes_to_ints(bb)) + byte_values = [0, 255, 17, 23, 42, 57] + bb = binary_bytes(byte_values) + assert len(bb) == len(byte_values) + assert byte_values == list(bytes_to_ints(bb)) |