Browse Source

Merge "Skip test for testr hook being installed when testr is not available"

tags/5.0.0^0
Zuul 8 months ago
parent
commit
73a763d1e3
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      pbr/tests/test_hooks.py

+ 3
- 0
pbr/tests/test_hooks.py View File

@@ -41,7 +41,9 @@
41 41
 import os
42 42
 
43 43
 from testtools import matchers
44
+from testtools import skipUnless
44 45
 
46
+from pbr import testr_command
45 47
 from pbr.tests import base
46 48
 from pbr.tests import util
47 49
 
@@ -66,6 +68,7 @@ class TestHooks(base.BaseTestCase):
66 68
         assert 'test_hook_1\ntest_hook_2' in stdout
67 69
         assert return_code == 0
68 70
 
71
+    @skipUnless(testr_command.have_testr, "testrepository not available")
69 72
     def test_custom_commands_known(self):
70 73
         stdout, _, return_code = self.run_setup('--help-commands')
71 74
         self.assertFalse(return_code)

Loading…
Cancel
Save