diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-10 15:32:27 +0000 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-20 09:38:42 +0000 |
commit | b7fb58d51a883a602b2117fe4107a94322256de1 (patch) | |
tree | 81c489d369e41afcbd304f599fd845627502acc2 /tests/sources | |
parent | 254cc4d02451225b1a99fe31f923d3f9f79b0acb (diff) | |
download | buildstream-b7fb58d51a883a602b2117fe4107a94322256de1.tar.gz |
tests:lint: use set comprehensions instead of set([])
Diffstat (limited to 'tests/sources')
-rw-r--r-- | tests/sources/git.py | 6 |
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') |