Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require internet connexion to run configparser tests #854

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pydoctor/test/test_configparser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from io import StringIO
from typing import Any, Dict, List
import requests
from pathlib import Path

from pydoctor._configparser import parse_toml_section_name, is_quoted, unquote_str, IniConfigParser, TomlConfigParser

Expand Down Expand Up @@ -32,9 +32,11 @@ def test_unquote_str() -> None:
assert unquote_str('""""value""""') == '""""value""""'

def test_unquote_naughty_quoted_strings() -> None:
# See https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt
res = requests.get('https://raw.githubusercontent.com/minimaxir/big-list-of-naughty-strings/master/blns.txt')
text = res.text
# See https://github.com/minimaxir/big-list-of-naughty-strings

text = Path(__file__).parent.joinpath('unquote_test_strings.txt'
).read_text(encoding='utf-8', errors='replace')

for i, string in enumerate(text.split('\n')):
if string.strip().startswith('#'):
continue
Expand Down
Loading
Loading