From: Mike Frysinger Date: Sun, 5 Apr 2020 04:54:46 +0000 (-0400) Subject: test.py: more boilerplate updates X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4ad3c25025a5508c492f40b93d8916c3004cd71d;p=home.git test.py: more boilerplate updates --- 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)