From 4ad3c25025a5508c492f40b93d8916c3004cd71d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 5 Apr 2020 00:54:46 -0400 Subject: [PATCH] test.py: more boilerplate updates --- test.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py index 70d4ffb..e643615 100755 --- a/test.py +++ b/test.py @@ -4,6 +4,7 @@ """Test module for quick hacking.""" from __future__ import absolute_import +from __future__ import division from __future__ import print_function # pylint: disable=unused-import @@ -23,14 +24,28 @@ import signal import subprocess import sys import time +import unittest + +try: + from unittest import mock +except ImportError: + import mock -import mock import requests import six +def get_parser(): + """Get CLI parser.""" + parser = argparse.ArgumentParser(description=__doc__) + return parser + + def main(argv): """The main entry point for scripts.""" + parser = get_parser() + opts = parser.parse_args(argv) + print(argv) -- 2.39.5