-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
raindrum
committed
Sep 18, 2024
1 parent
4d50ba3
commit 1cc810f
Showing
15 changed files
with
111 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,5 +35,5 @@ markdown_extensions: | |
- pymdownx.superfences | ||
|
||
extra: | ||
version: 11.4.1 | ||
version: 11.4.2 | ||
history_buttons: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"tests for individual citation templates. not all of them are ready yet" | ||
|
||
# import requests | ||
# import time | ||
|
||
from warnings import warn | ||
|
||
import requests | ||
import pytest | ||
|
||
from citeurl import Citator | ||
from .test_templates import TESTS | ||
|
||
@pytest.mark.parametrize('template', TESTS.keys()) | ||
def test_link(template): | ||
test_data = TESTS[template] | ||
if not test_data.get('URL'): | ||
warn(f'SKIPPED {template} - no URL') | ||
return | ||
print(f'{template} ({test_data["URL"]}) ... ', end='') | ||
try: | ||
response = requests.get(test_data['URL']) | ||
except requests.exceptions.SSLError: | ||
warn(f'SKIPPED {template} - SSL error') | ||
return | ||
if response.status_code == 403: | ||
warn(f'SKIPPED {template} - Error 403 (Forbidden)') | ||
return | ||
assert response.ok, f"{test_data['URL']} returned {response.status_code}" | ||
|