Skip to content

Commit

Permalink
dependencies: update setup and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Nov 17, 2023
1 parent 0ebbbcb commit f4ec8f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_long_description():
"brotli",
"cchardet >= 2.1.7; python_version < '3.11'", # build issue
"faust-cchardet >= 2.1.18; python_version >= '3.11'", # fix for build
"htmldate[speed] >= 1.5.1",
"htmldate[speed] @ git+https://github.com/adbar/htmldate",
"py3langid >= 0.2.2",
"pycurl >= 7.45.2",
],
Expand Down Expand Up @@ -111,8 +111,8 @@ def get_long_description():
"certifi",
"charset_normalizer >= 3.0.1; python_version < '3.7'",
"charset_normalizer >= 3.2.0; python_version >= '3.7'",
"courlan >= 0.9.4",
"htmldate >= 1.5.1",
"courlan @ git+https://github.com/adbar/courlan",
"htmldate @ git+https://github.com/adbar/htmldate",
"justext >= 3.0.0",
"lxml >= 4.9.3 ; platform_system != 'Darwin'",
"lxml == 4.9.2 ; platform_system == 'Darwin'",
Expand Down
2 changes: 1 addition & 1 deletion tests/metadata_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_dates():
metadata = extract_metadata(mystring, fastmode=False)
assert metadata.date == '2017-09-01'
metadata = extract_metadata(mystring, fastmode=True)
assert metadata.date is None
assert metadata.date == '2017-09-01'


def test_sitename():
Expand Down
3 changes: 2 additions & 1 deletion tests/realworld_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,9 @@ def test_pages():
assert metadata.url == url

url = 'https://www.ndr.de/nachrichten/info/16-Coronavirus-Update-Wir-brauchen-Abkuerzungen-bei-der-Impfstoffzulassung,podcastcoronavirus140.html'
corrected_url = 'https://www.ndr.de/nachrichten/info/16-Coronavirus-Update-Wir-brauchen-Abkuerzungen-bei-der-Impfstoffzulassung%2Cpodcastcoronavirus140.html'
metadata = extract_metadata(load_mock_page_meta(url), default_url=url)
assert metadata.url == url
assert metadata.url == corrected_url
assert 'Korinna Hennig' in metadata.author
assert 'Ältere Menschen' in str(metadata.tags)

Expand Down

0 comments on commit f4ec8f5

Please sign in to comment.