From 97ecc3442f918bd43dd6043180966e8b56d0b141 Mon Sep 17 00:00:00 2001 From: Jonathan Springer Date: Mon, 14 Apr 2014 15:45:41 -0400 Subject: [PATCH 1/2] Fix bzt tag test to handle being run from a different directory --- tests/utils/test_bzr_tags.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/utils/test_bzr_tags.py b/tests/utils/test_bzr_tags.py index 7bb38f4ab..73817e883 100644 --- a/tests/utils/test_bzr_tags.py +++ b/tests/utils/test_bzr_tags.py @@ -29,6 +29,7 @@ """ Package to test for proper bzr tags. """ +import os from unittest import TestCase @@ -63,11 +64,12 @@ class TestBzrTags(TestCase): Test for proper bzr tags """ # GIVEN: A bzr branch + path = os.path.dirname(__file__) # WHEN getting the branches tags - bzr = Popen(('bzr', 'tags'), stdout=PIPE) + bzr = Popen(('bzr', 'tags', '--directory=' + path), stdout=PIPE) stdout = bzr.communicate()[0] 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') + self.assertEqual(TAGS, tags, path) From 6c86c9768db373988b1dda70cbd1a34ebeca2891 Mon Sep 17 00:00:00 2001 From: Jonathan Springer Date: Mon, 14 Apr 2014 16:01:13 -0400 Subject: [PATCH 2/2] Fix typo --- tests/utils/test_bzr_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/test_bzr_tags.py b/tests/utils/test_bzr_tags.py index 73817e883..95017e94f 100644 --- a/tests/utils/test_bzr_tags.py +++ b/tests/utils/test_bzr_tags.py @@ -72,4 +72,4 @@ class TestBzrTags(TestCase): tags = [line.decode('utf-8').split() for line in stdout.splitlines()] # THEN the tags should match the accepted tags - self.assertEqual(TAGS, tags, path) + self.assertEqual(TAGS, tags, 'List of tags should match')