geminispace.info

gemini search engine
git clone https://git.clttr.info/geminispace.info.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 105f1ca2c60397cc0c17992a0343162f82789aef
parent e897bc488b64e250c9f666a89accd19c965bac03
Author: René Wagner <rwagner@rw-net.de>
Date:   Sun,  7 Feb 2021 17:48:36 +0100

Merge branch 'master' of git://natpen.net/gus

Diffstat:
Mgus/crawl.py | 8+++++++-
Mtests/gus/lib/test_gemini.py | 3+++
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gus/crawl.py b/gus/crawl.py @@ -9,7 +9,13 @@ import pickle import time from urllib.parse import urljoin, uses_relative, uses_netloc -import feedparser +# TODO: this import breaks with Python 3.9, but all code that relies +# on this code path is currently dead code, so for now I'm just +# commenting out the import. It would be nice to make an actual +# decision soon about whether or not feed-based updating is even +# worth keeping around. If not, the dead code paths could simply +# deleted, and GUS would get a bit simpler :) +# import feedparser import peewee from . import constants diff --git a/tests/gus/lib/test_gemini.py b/tests/gus/lib/test_gemini.py @@ -46,7 +46,10 @@ text @pytest.mark.parametrize("test_input,expected_result", [ (["gemini://gus.guru", None, None], [True, "gemini://gus.guru", "gus.guru"]), (["/bar", "gemini://gus.guru/foo", None], [False, None, None]), + (["/bar", "gemini://gus.guru/foo/", None], [False, None, None]), (["/bar", "gemini://gus.guru/foo", "gus.guru"], [True, "gemini://gus.guru/bar", "gus.guru"]), + (["/bar", "gemini://gus.guru/foo/", "gus.guru"], [True, "gemini://gus.guru/bar", "gus.guru"]), + (["bar", "gemini://gus.guru/foo", "gus.guru"], [True, "gemini://gus.guru/bar", "gus.guru"]), (["bar", "gemini://gus.guru/foo/", "gus.guru"], [True, "gemini://gus.guru/foo/bar", "gus.guru"]), # (["bar", "gemini://gus.guru/foo", "gus.guru"], [True, "gemini://gus.guru/foo/bar", "gus.guru"]), (["//foo.com", None, None], [True, "gemini://foo.com", "foo.com"]),