only test save on >3.7
This commit is contained in:
parent
44bb2cf5e4
commit
56bef064b1
@ -8,9 +8,12 @@ sys.path.append("..")
|
|||||||
import waybackpy.cli as cli # noqa: E402
|
import waybackpy.cli as cli # noqa: E402
|
||||||
from waybackpy.wrapper import Url # noqa: E402
|
from waybackpy.wrapper import Url # noqa: E402
|
||||||
|
|
||||||
def test_save():
|
if sys.version_info > (3, 7):
|
||||||
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")
|
def test_save():
|
||||||
cli._save(obj)
|
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():
|
def test_get():
|
||||||
args = argparse.Namespace(get='oldest')
|
args = argparse.Namespace(get='oldest')
|
||||||
@ -20,6 +23,11 @@ def test_get():
|
|||||||
cli._get(obj, args)
|
cli._get(obj, args)
|
||||||
args = argparse.Namespace(get='url')
|
args = argparse.Namespace(get='url')
|
||||||
cli._get(obj, args)
|
cli._get(obj, args)
|
||||||
|
if sys.version_info > (3, 7):
|
||||||
|
args = argparse.Namespace(get='save')
|
||||||
|
cli._get(obj, args)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
def test_oldest():
|
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")
|
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")
|
||||||
|
Loading…
Reference in New Issue
Block a user