diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2018-05-17 23:31:16 +0200 |
---|---|---|
committer | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2018-05-23 16:45:09 +0200 |
commit | 9aacb4635e81edd6ecf281d4f6c0cfc8e94ab301 (patch) | |
tree | 195e1646c52970c23a8c1e0d3460841646a32e69 /testing/test_assertion.py | |
parent | d41119ed04b4b48e0d5db74d7a4ee29192d9e6b1 (diff) | |
download | pytest-9aacb4635e81edd6ecf281d4f6c0cfc8e94ab301.tar.gz |
run pyupgrade
Diffstat (limited to 'testing/test_assertion.py')
-rw-r--r-- | testing/test_assertion.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testing/test_assertion.py b/testing/test_assertion.py index 51229d3e1..f7b69ba2d 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -359,7 +359,7 @@ class TestAssert_reprcompare(object): + {0: 2} ? ^ """), - (set([0, 1]), set([0, 2]), """ + ({0, 1}, {0, 2}, """ Full diff: - set([0, 1]) ? ^ @@ -417,11 +417,11 @@ class TestAssert_reprcompare(object): assert lines[2] == "{'b': 1}" def test_set(self): - expl = callequal(set([0, 1]), set([0, 2])) + expl = callequal({0, 1}, {0, 2}) assert len(expl) > 1 def test_frozenzet(self): - expl = callequal(frozenset([0, 1]), set([0, 2])) + expl = callequal(frozenset([0, 1]), {0, 2}) assert len(expl) > 1 def test_Sequence(self): @@ -971,7 +971,7 @@ def test_set_with_unsortable_elements(): raise RuntimeError() def __repr__(self): - return 'repr({0})'.format(self.name) + return 'repr({})'.format(self.name) def __eq__(self, other): return self.name == other.name @@ -979,8 +979,8 @@ def test_set_with_unsortable_elements(): def __hash__(self): return hash(self.name) - left_set = set(UnsortableKey(str(i)) for i in range(1, 3)) - right_set = set(UnsortableKey(str(i)) for i in range(2, 4)) + left_set = {UnsortableKey(str(i)) for i in range(1, 3)} + right_set = {UnsortableKey(str(i)) for i in range(2, 4)} expl = callequal(left_set, right_set, verbose=True) # skip first line because it contains the "construction" of the set, which does not have a guaranteed order expl = expl[1:] |