only test save on >3.7

This commit is contained in:
Akash 2020-07-23 20:51:46 +05:30 committed by GitHub
parent 44bb2cf5e4
commit 56bef064b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,9 +8,12 @@ sys.path.append("..")
import waybackpy.cli as cli # noqa: E402
from waybackpy.wrapper import Url # noqa: E402
def test_save():
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")