diff --git a/python/mach_commands.py b/python/mach_commands.py --- a/python/mach_commands.py +++ b/python/mach_commands.py @@ -11,28 +11,20 @@ import tempfile from multiprocessing import cpu_count import six -from concurrent.futures import ( - ThreadPoolExecutor, - as_completed, - thread, -) +from concurrent.futures import ThreadPoolExecutor, as_completed, thread import mozinfo from mozfile import which from manifestparser import TestManifest from manifestparser import filters as mpf from mozbuild.base import MachCommandBase -from mach.decorators import ( - CommandArgument, - CommandProvider, - Command, -) +from mach.decorators import CommandArgument, CommandProvider, Command here = os.path.abspath(os.path.dirname(__file__)) @CommandProvider @@ -48,19 +40,18 @@ "--ipython", action="store_true", default=False, help="Use ipython instead of the default Python REPL.", ) + @CommandArgument("--test", action="store_true") @CommandArgument("args", nargs=argparse.REMAINDER) def python(self, no_virtualenv, exec_file, ipython, args): # Avoid logging the command self.log_manager.terminal_handler.setLevel(logging.CRITICAL) # Note: subprocess requires native strings in os.environ on Windows. - append_env = { - "PYTHONDONTWRITEBYTECODE": str("1"), - } + append_env = {"PYTHONDONTWRITEBYTECODE": str("1")} if no_virtualenv: python_path = sys.executable append_env["PYTHONPATH"] = os.pathsep.join(sys.path) else: