← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~springermac/openlp/bzr-tag-test into lp:openlp

 

Jonathan Springer has proposed merging lp:~springermac/openlp/bzr-tag-test into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~springermac/openlp/bzr-tag-test/+merge/215751

Fix bzr tag test to handle being run from different directory
-- 
https://code.launchpad.net/~springermac/openlp/bzr-tag-test/+merge/215751
Your team OpenLP Core is requested to review the proposed merge of lp:~springermac/openlp/bzr-tag-test into lp:openlp.
=== modified file 'tests/utils/test_bzr_tags.py'
--- tests/utils/test_bzr_tags.py	2014-04-07 17:22:12 +0000
+++ tests/utils/test_bzr_tags.py	2014-04-14 19:59:00 +0000
@@ -29,6 +29,7 @@
 """
 Package to test for proper bzr tags.
 """
+import os
 
 from unittest import TestCase
 
@@ -63,11 +64,12 @@
         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)