Phil Dawson pushed to branch phil/plugin-testing-api at BuildStream / buildstream
Commits:
-
62fe58ab
by Phil Dawson at 2019-01-16T16:03:30Z
1 changed file:
Changes:
| ... | ... | @@ -5,7 +5,6 @@ import shutil |
| 5 | 5 |
import tempfile
|
| 6 | 6 |
import itertools
|
| 7 | 7 |
import traceback
|
| 8 |
-import subprocess
|
|
| 9 | 8 |
from contextlib import contextmanager, ExitStack
|
| 10 | 9 |
from ruamel import yaml
|
| 11 | 10 |
import pytest
|
| ... | ... | @@ -327,7 +326,7 @@ class Cli(): |
| 327 | 326 |
|
| 328 | 327 |
return result
|
| 329 | 328 |
|
| 330 |
- def invoke(self, cli, args=None, color=False, binary_capture=False, **extra):
|
|
| 329 |
+ def invoke(self, cli_object, args=None, color=False, binary_capture=False, **extra):
|
|
| 331 | 330 |
exc_info = None
|
| 332 | 331 |
exception = None
|
| 333 | 332 |
exit_code = 0
|
| ... | ... | @@ -342,7 +341,7 @@ class Cli(): |
| 342 | 341 |
capture.start_capturing()
|
| 343 | 342 |
|
| 344 | 343 |
try:
|
| 345 |
- cli.main(args=args or (), prog_name=cli.name, **extra)
|
|
| 344 |
+ cli_object.main(args=args or (), prog_name=cli_object.name, **extra)
|
|
| 346 | 345 |
except SystemExit as e:
|
| 347 | 346 |
if e.code != 0:
|
| 348 | 347 |
exception = e
|
| ... | ... | @@ -355,7 +354,7 @@ class Cli(): |
| 355 | 354 |
sys.stdout.write(str(exit_code))
|
| 356 | 355 |
sys.stdout.write('\n')
|
| 357 | 356 |
exit_code = 1
|
| 358 |
- except Exception as e:
|
|
| 357 |
+ except Exception as e: # pylint: disable=broad-except
|
|
| 359 | 358 |
exception = e
|
| 360 | 359 |
exit_code = -1
|
| 361 | 360 |
exc_info = sys.exc_info()
|
