aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-06-25 19:40:50 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-06-25 19:40:50 +0300
commit529378a1e3b3dde43531ceb2ed9147d03981d050 (patch)
tree8bd6500cc3ef5c669c41143ffa1be1d4d0139c25 /test.py
parentscientific notation by default in plots (diff)
downloadsorting-algorithms-529378a1e3b3dde43531ceb2ed9147d03981d050.tar.gz
sorting-algorithms-529378a1e3b3dde43531ceb2ed9147d03981d050.zip
code style
Diffstat (limited to 'test.py')
-rw-r--r--test.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test.py b/test.py
index a9bf401..4c96ead 100644
--- a/test.py
+++ b/test.py
@@ -47,11 +47,14 @@ def _format_available_algorithms():
def _format_description():
return _format_available_algorithms()
-def _parse_args(args=sys.argv):
- parser = argparse.ArgumentParser(
+def _create_argument_parser():
+ return argparse.ArgumentParser(
description=_format_description(),
formatter_class=argparse.RawDescriptionHelpFormatter)
+def _parse_args(args=sys.argv):
+ parser = _create_argument_parser()
+
parser.add_argument('algorithm', metavar='CODENAME',
choices=registry.get_codenames(),
help='algorithm codename')