From d3526c6204ee9a11b77cb4a0f74f2c96c70ed4a0 Mon Sep 17 00:00:00 2001 From: Jonathan Springer Date: Mon, 7 Apr 2014 13:22:12 -0400 Subject: [PATCH] Simplify code per Andreas Preikschat's comment. --- tests/utils/test_bzr_tags.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/utils/test_bzr_tags.py b/tests/utils/test_bzr_tags.py index 0bcc73b54..7bb38f4ab 100644 --- a/tests/utils/test_bzr_tags.py +++ b/tests/utils/test_bzr_tags.py @@ -65,12 +65,9 @@ class TestBzrTags(TestCase): # GIVEN: A bzr branch # WHEN getting the branches tags - tags = [] bzr = Popen(('bzr', 'tags'), stdout=PIPE) stdout = bzr.communicate()[0] - lines = (line.decode('utf-8') for line in stdout.splitlines()) - for line in lines: - tags.append(line.split()) + tags = [line.decode('utf-8').split() for line in stdout.splitlines()] # THEN the tags should match the accepted tags self.assertEqual(TAGS, tags, 'List of tags should match')