Simplify code per Andreas Preikschat's comment.

This commit is contained in:
Jonathan Springer 2014-04-07 13:22:12 -04:00
parent e19ab7a2c3
commit d3526c6204

View File

@ -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')