diff options
Diffstat (limited to 'tests_isolated')
4 files changed, 48 insertions, 14 deletions
diff --git a/tests_isolated/test_commandset/conftest.py b/tests_isolated/test_commandset/conftest.py index 037be199..e6050f8d 100644 --- a/tests_isolated/test_commandset/conftest.py +++ b/tests_isolated/test_commandset/conftest.py @@ -3,15 +3,30 @@ Cmd2 unit/functional testing """ import sys -from contextlib import redirect_stderr, redirect_stdout -from typing import List, Optional, Union -from unittest import mock - -from pytest import fixture +from contextlib import ( + redirect_stderr, + redirect_stdout, +) +from typing import ( + List, + Optional, + Union, +) +from unittest import ( + mock, +) + +from pytest import ( + fixture, +) import cmd2 -from cmd2_ext_test import ExternalTestMixin -from cmd2.utils import StdSim +from cmd2.utils import ( + StdSim, +) +from cmd2_ext_test import ( + ExternalTestMixin, +) # Prefer statically linked gnureadline if available (for macOS compatibility due to issues with libedit) try: diff --git a/tests_isolated/test_commandset/test_argparse_subcommands.py b/tests_isolated/test_commandset/test_argparse_subcommands.py index bd2bed42..9618a53a 100644 --- a/tests_isolated/test_commandset/test_argparse_subcommands.py +++ b/tests_isolated/test_commandset/test_argparse_subcommands.py @@ -9,7 +9,11 @@ import argparse import pytest import cmd2 -from .conftest import run_cmd, WithCommandSets + +from .conftest import ( + WithCommandSets, + run_cmd, +) class SubcommandSet(cmd2.CommandSet): diff --git a/tests_isolated/test_commandset/test_categories.py b/tests_isolated/test_commandset/test_categories.py index c266e0d4..905d68a8 100644 --- a/tests_isolated/test_commandset/test_categories.py +++ b/tests_isolated/test_commandset/test_categories.py @@ -3,10 +3,15 @@ """ Simple example demonstrating basic CommandSet usage. """ -from typing import Any +from typing import ( + Any, +) import cmd2 -from cmd2 import CommandSet, with_default_category +from cmd2 import ( + CommandSet, + with_default_category, +) @with_default_category('Default Category') diff --git a/tests_isolated/test_commandset/test_commandset.py b/tests_isolated/test_commandset/test_commandset.py index 21cce8bf..7a192888 100644 --- a/tests_isolated/test_commandset/test_commandset.py +++ b/tests_isolated/test_commandset/test_commandset.py @@ -5,14 +5,24 @@ Test CommandSet """ import argparse -from typing import List +from typing import ( + List, +) import pytest import cmd2 -from cmd2 import utils -from .conftest import complete_tester, WithCommandSets -from cmd2.exceptions import CommandSetRegistrationError +from cmd2 import ( + utils, +) +from cmd2.exceptions import ( + CommandSetRegistrationError, +) + +from .conftest import ( + WithCommandSets, + complete_tester, +) class CommandSetBase(cmd2.CommandSet): |