From 56bef064b13b6f8ea8c17c5b059ca089b8dcce22 Mon Sep 17 00:00:00 2001 From: Akash <64683866+akamhy@users.noreply.github.com> Date: Thu, 23 Jul 2020 20:51:46 +0530 Subject: [PATCH] only test save on >3.7 --- tests/test_cli.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 44e4dbb..0268e95 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -8,9 +8,12 @@ sys.path.append("..") import waybackpy.cli as cli # noqa: E402 from waybackpy.wrapper import Url # noqa: E402 -def test_save(): - obj = Url("https://pypi.org/user/akamhy/", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9") - cli._save(obj) +if sys.version_info > (3, 7): + def test_save(): + obj = Url("https://pypi.org/user/akamhy/", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9") + cli._save(obj) +else: + pass def test_get(): args = argparse.Namespace(get='oldest') @@ -20,6 +23,11 @@ def test_get(): cli._get(obj, args) args = argparse.Namespace(get='url') cli._get(obj, args) + if sys.version_info > (3, 7): + args = argparse.Namespace(get='save') + cli._get(obj, args) + else: + pass def test_oldest(): obj = Url("https://pypi.org/user/akamhy/", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9")