Fix tests on windows

Make the speedup dependency to thefuzz optional it requires a C compiler
This commit is contained in:
Timmy Welch 2022-08-08 19:03:25 -07:00
parent aadeb07c49
commit f17f560705
3 changed files with 5 additions and 4 deletions

1
requirements-speedup.txt Normal file
View File

@ -0,0 +1 @@
thefuzz[speedup]>=0.19.0

View File

@ -7,6 +7,6 @@ py7zr
pycountry
requests==2.*
text2digits
thefuzz[speedup]>=0.19.0
thefuzz>=0.19.0
typing_extensions
wordninja

View File

@ -85,13 +85,13 @@ def test_unique_file(tmp_path):
def test_add_to_path(monkeypatch):
monkeypatch.setenv("PATH", "/usr/bin")
monkeypatch.setenv("PATH", os.path.abspath("/usr/bin"))
comicapi.utils.add_to_path("/bin")
assert os.environ["PATH"] == "/bin:/usr/bin"
assert os.environ["PATH"] == (os.path.abspath("/bin") + os.pathsep + os.path.abspath("/usr/bin"))
comicapi.utils.add_to_path("/usr/bin")
comicapi.utils.add_to_path("/usr/bin/")
assert os.environ["PATH"] == "/bin:/usr/bin"
assert os.environ["PATH"] == (os.path.abspath("/bin") + os.pathsep + os.path.abspath("/usr/bin"))
titles = [