forked from pool/python-argcomplete
- Add without_fish.patch which makes fish only optional BuildRequires (gh#kislyuk/argcomplete!410). OBS-URL: https://build.opensuse.org/request/show/1072303 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=43
27 lines
951 B
Diff
27 lines
951 B
Diff
---
|
|
test/test.py | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
--- a/test/test.py
|
|
+++ b/test/test.py
|
|
@@ -30,7 +30,10 @@ COMP_WORDBREAKS = " \t\n\"'><=;|&(:"
|
|
|
|
BASH_VERSION = subprocess.check_output(['bash', '-c', 'echo $BASH_VERSION']).decode()
|
|
BASH_MAJOR_VERSION = int(BASH_VERSION.split('.')[0])
|
|
-FISH_VERSION_STR = subprocess.check_output(['fish', '-c', 'echo -n $version']).decode()
|
|
+try:
|
|
+ FISH_VERSION_STR = subprocess.check_output(['fish', '-c', 'echo -n $version']).decode()
|
|
+except FileNotFoundError:
|
|
+ FISH_VERSION_STR = "0.0.0"
|
|
FISH_VERSION_TUPLE = tuple(int(x) for x in FISH_VERSION_STR.split('.'))
|
|
|
|
|
|
@@ -1308,6 +1311,7 @@ class TestBashGlobal(TestBash):
|
|
self._test_console_script(package=True, wheel=True)
|
|
|
|
|
|
+@unittest.skipIf(FISH_VERSION_TUPLE == (0, 0, 0), "Fish is not available")
|
|
class TestFish(_TestSh, unittest.TestCase):
|
|
expected_failures = [
|
|
'test_parse_special_characters',
|