openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #28692
[Merge] lp:~thelinuxguy/openlp/skip-bzr-test into lp:openlp
Simon Hanna has proposed merging lp:~thelinuxguy/openlp/skip-bzr-test into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~thelinuxguy/openlp/skip-bzr-test/+merge/286073
Currently testing the releases is failing because they obviously are no bzr branches.
This change checks the return code of the bzr call and if it is 3 it skips the test.
Sadly the return codes for "bzr tags" are not documented in the manual, but I got 3 when running it on my machine. It felt safer to use " == 3" instead of the more generic " != 0"
--
Your team OpenLP Core is requested to review the proposed merge of lp:~thelinuxguy/openlp/skip-bzr-test into lp:openlp.
=== modified file 'tests/utils/test_bzr_tags.py'
--- tests/utils/test_bzr_tags.py 2016-02-13 14:41:12 +0000
+++ tests/utils/test_bzr_tags.py 2016-02-15 16:07:36 +0000
@@ -44,6 +44,8 @@
# WHEN getting the branches tags
bzr = Popen(('bzr', 'tags', '--directory=' + path), stdout=PIPE)
std_out = bzr.communicate()[0]
+ if bzr.returncode == 3:
+ self.skipTest("Skipping bzr tag test because this isn't a bzr branch")
count = len(TAGS1)
tags = [line.decode('utf-8').split()[0] for line in std_out.splitlines()]
count1 = 0
Follow ups