Skip to content

Commit

Permalink
revive ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Lindahl committed Sep 1, 2024
1 parent b160fb4 commit 0f821fa
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_multi_ia(capsys, caplog):
multi_helper(t, capsys, caplog)


def test_multi_rest(capsys, caplog):
def test_multi_misc_notia(capsys, caplog):
tests = [
[{'service': '--source https://web.archive.org/cdx/search/cdx', 'mods': '--limit 10', 'cmd': 'iter', 'rest': 'commoncrawl.org/*'},
{'count': 10, 'linefgrep': 'commoncrawl.org'}],
Expand All @@ -133,23 +133,29 @@ def test_multi_rest(capsys, caplog):

[{'service': '--cc', 'mods': '--limit 10', 'cmd': 'size', 'rest': 'commoncrawl.org/*'},
{'count': 1, 'is_int': True}],
[{'service': '--ia', 'mods': '--limit 10', 'cmd': 'size', 'rest': 'commoncrawl.org/*'},
{'count': 1, 'is_int': True}],
[{'service': '--cc', 'mods': '--limit 10', 'cmd': 'size', 'rest': '--details commoncrawl.org/*'},
{'count': 2}],

[{'service': '', 'mods': '--limit 10', 'cmd': 'iter', 'rest': 'commoncrawl.org/*'},
{'exception': ValueError}],
]

for t in tests:
multi_helper(t, capsys, caplog)


@pytest.mark.skip(reason='needs some ratelimit love XXX')
def test_multi_misc_ia(capsys, caplog):
tests = [
[{'service': '--ia', 'mods': '--limit 10', 'cmd': 'size', 'rest': 'commoncrawl.org/*'},
{'count': 1, 'is_int': True}],
[{'service': '--ia', 'mods': '--limit 10', 'cmd': 'size', 'rest': '--details commoncrawl.org/*'},
{'count': 2}],
[{'service': '--ia', 'mods': '--from 20180101 --to 20180110 --limit 10', 'cmd': 'size', 'rest': '--details commoncrawl.org'},
{'count': 2}],

[{'service': '', 'mods': '--limit 10', 'cmd': 'iter', 'rest': 'commoncrawl.org/*'},
{'exception': ValueError}],
]

for t in tests:
if t[0]['service'] == '--ia':
# XXX skip
continue
multi_helper(t, capsys, caplog)


Expand Down

0 comments on commit 0f821fa

Please sign in to comment.