Skip to content

Commit ea5eb8e

Browse files
committed
Another attempt at getting it working on travis.
1 parent 7d07826 commit ea5eb8e

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

examples/subcommands.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
from cmd2.argcomplete_bridge import CompletionFinder
4242
from cmd2.argparse_completer import AutoCompleter
4343
if __name__ == '__main__':
44-
with open('out.txt', 'a') as f:
45-
f.write('Here 1')
46-
f.flush()
4744
completer = CompletionFinder()
4845
completer(base_parser, AutoCompleter(base_parser))
4946
except ImportError:

tests/test_bashcompletion.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
skip_reason = "argcomplete isn't installed\n"
2424

2525

26-
skip_reason2 = "TRAVIS" in os.environ and os.environ["TRAVIS"] == "true"
27-
if skip_reason2:
28-
skip_reason += 'These tests cannot run on TRAVIS\n'
26+
# skip_reason2 = "TRAVIS" in os.environ and os.environ["TRAVIS"] == "true"
27+
# if skip_reason2:
28+
# skip_reason += 'These tests cannot run on TRAVIS\n'
29+
skip_reaason2 = False
2930
skip_reason3 = sys.platform.startswith('win')
3031
if skip_reason3:
3132
skip_reason = 'argcomplete doesn\'t support Windows'
@@ -111,10 +112,10 @@ def test_bash_nocomplete(parser1):
111112
os_fdopen = os.fdopen
112113

113114

114-
def my_fdopen(fd, mode):
115+
def my_fdopen(fd, mode, *args):
115116
"""mock fdopen that redirects 8 and 9 from argcomplete to stdin/stdout for testing"""
116117
if fd > 7:
117-
return os_fdopen(fd - 7, mode)
118+
return os_fdopen(fd - 7, mode, *args)
118119
return os_fdopen(fd, mode)
119120

120121

@@ -165,11 +166,11 @@ def test_commands(parser1, capfd, mock, comp_line, exp_out, exp_err):
165166
assert err == exp_err
166167

167168

168-
def fdopen_fail_8(fd, mode):
169+
def fdopen_fail_8(fd, mode, *args):
169170
"""mock fdopen that forces failure if fd == 8"""
170171
if fd == 8:
171172
raise IOError()
172-
return my_fdopen(fd, mode)
173+
return my_fdopen(fd, mode, *args)
173174

174175

175176
# noinspection PyShadowingNames
@@ -194,11 +195,11 @@ def test_fail_alt_stdout(parser1, mock):
194195
assert err.code == 1
195196

196197

197-
def fdopen_fail_9(fd, mode):
198+
def fdopen_fail_9(fd, mode, *args):
198199
"""mock fdopen that forces failure if fd == 9"""
199200
if fd == 9:
200201
raise IOError()
201-
return my_fdopen(fd, mode)
202+
return my_fdopen(fd, mode, *args)
202203

203204

204205
# noinspection PyShadowingNames

0 commit comments

Comments
 (0)