summaryrefslogtreecommitdiff
path: root/tests/sources/git.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-10 15:32:27 +0000
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-20 09:38:42 +0000
commitb7fb58d51a883a602b2117fe4107a94322256de1 (patch)
tree81c489d369e41afcbd304f599fd845627502acc2 /tests/sources/git.py
parent254cc4d02451225b1a99fe31f923d3f9f79b0acb (diff)
downloadbuildstream-b7fb58d51a883a602b2117fe4107a94322256de1.tar.gz
tests:lint: use set comprehensions instead of set([])
Diffstat (limited to 'tests/sources/git.py')
-rw-r--r--tests/sources/git.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/sources/git.py b/tests/sources/git.py
index 068affd03..debbb04ab 100644
--- a/tests/sources/git.py
+++ b/tests/sources/git.py
@@ -855,8 +855,8 @@ def test_git_describe(cli, tmpdir, datafiles, ref_storage, tag_type):
assert 'annotated' in tag
assert tag['annotated'] == (tag_type == 'annotated')
- assert set([(tag['tag'], tag['commit']) for tag in tags]) == set([('tag1', repo.rev_parse('tag1^{commit}')),
- ('tag2', repo.rev_parse('tag2^{commit}'))])
+ assert {(tag['tag'], tag['commit']) for tag in tags} == {('tag1', repo.rev_parse('tag1^{commit}')),
+ ('tag2', repo.rev_parse('tag2^{commit}'))}
checkout = os.path.join(str(tmpdir), 'checkout')
@@ -966,7 +966,7 @@ def test_git_describe_head_is_tagged(cli, tmpdir, datafiles, ref_storage, tag_ty
assert 'annotated' in tag
assert tag['annotated'] == (tag_type == 'annotated')
- assert set([(tag['tag'], tag['commit']) for tag in tags]) == set([('tag', repo.rev_parse('tag^{commit}'))])
+ assert {(tag['tag'], tag['commit']) for tag in tags} == {('tag', repo.rev_parse('tag^{commit}'))}
checkout = os.path.join(str(tmpdir), 'checkout')