mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-01 10:46:42 +00:00
Fix the broken fake_react by not using the argv feature
This commit is contained in:
parent
a4b0b4a01a
commit
2746eb9ae1
@ -180,7 +180,7 @@ def run(argv=sys.argv, stderr=sys.stderr):
|
||||
from allmydata.windows.fixups import initialize
|
||||
initialize()
|
||||
# doesn't return: calls sys.exit(rc)
|
||||
task.react(_run_with_reactor, argv, stderr)
|
||||
task.react(lambda reactor: _run_with_reactor(reactor, argv, stderr))
|
||||
|
||||
|
||||
def _setup_coverage(reactor, argv):
|
||||
|
@ -524,12 +524,12 @@ class CLI(CLITestMixin, unittest.TestCase):
|
||||
ns.sys_exit_called = True
|
||||
self.failUnlessEqual(exitcode, 1)
|
||||
|
||||
def fake_react(f, *args):
|
||||
def fake_react(f):
|
||||
reactor = Mock()
|
||||
# normally this Deferred would be errbacked with SystemExit, but
|
||||
# since we mocked out sys.exit, it will be fired with None. So
|
||||
# it's safe to drop it on the floor.
|
||||
f(reactor, *args)
|
||||
f(reactor)
|
||||
|
||||
patcher = MonkeyPatcher((runner, 'parse_or_exit_with_explanation',
|
||||
call_parse_or_exit),
|
||||
|
Loading…
Reference in New Issue
Block a user