diff options
author | Eric Lin <anselor@gmail.com> | 2021-01-05 11:29:39 -0500 |
---|---|---|
committer | Eric Lin <anselor@gmail.com> | 2021-01-21 10:24:08 -0500 |
commit | f1f76a4ba207d802f78277d0ba3defa44cf7b973 (patch) | |
tree | 0a59103b35e9160aed2466fdafa0f8020c426bcc /tests_isolated | |
parent | e0dee46ca871e56523059b1566577ff781f6fb63 (diff) | |
download | cmd2-git-import_wrapping.tar.gz |
Changed isort to force wrapping of imports to reduce merge conflicts from minor import changes.import_wrapping
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): |