mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Reuse linkcheck.bookmarks.safari.has_biplist in tests
This commit is contained in:
parent
ca59966cf0
commit
e75c4b3d36
1 changed files with 2 additions and 9 deletions
|
|
@ -22,6 +22,7 @@ import pytest
|
|||
from contextlib import contextmanager
|
||||
from functools import lru_cache, wraps
|
||||
from linkcheck import LinkCheckerInterrupt
|
||||
from linkcheck.bookmarks.safari import has_biplist as bookmarks_has_biplist
|
||||
|
||||
|
||||
basedir = os.path.dirname(__file__)
|
||||
|
|
@ -173,15 +174,7 @@ need_pyftpdlib = _need_func(has_pyftpdlib, "pyftpdlib")
|
|||
@lru_cache(1)
|
||||
def has_biplist():
|
||||
"""Test if biplist is available."""
|
||||
if sys.version_info >= (3, 9):
|
||||
return False
|
||||
|
||||
try:
|
||||
import biplist
|
||||
|
||||
return True
|
||||
except ImportError:
|
||||
return False
|
||||
return bookmarks_has_biplist
|
||||
|
||||
|
||||
need_biplist = _need_func(has_biplist, "biplist")
|
||||
|
|
|
|||
Loading…
Reference in a new issue