minor fixes

This commit is contained in:
lilydjwg 2021-06-11 16:10:34 +08:00
parent d2c7d48a2f
commit a969f12d20
9 changed files with 13 additions and 11 deletions

View file

@ -41,7 +41,7 @@ jobs:
if: ${{ contains(matrix.deps, 'pycurl') }}
run: sudo apt install -y libcurl4-openssl-dev
- name: Install Python deps
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog toml appdirs
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog toml appdirs lxml
- name: Decrypt keys
env:
KEY: ${{ secrets.KEY }}

View file

@ -286,7 +286,7 @@ xpath
An xpath expression used to find the version string.
.. note::
An additional dependency "lxml" is required
An additional dependency "lxml" is required.
Find with a Command
~~~~~~~~~~~~~~~~~~~

View file

@ -20,3 +20,6 @@ ignore_missing_imports = True
[mypy-appdirs]
ignore_missing_imports = True
[mypy-lxml]
ignore_missing_imports = True

View file

@ -264,7 +264,6 @@ class FunctionWorker(BaseWorker):
except Exception as e:
await self.result_q.put(RawResult(name, e, entry))
class GetVersionError(Exception):
'''An error occurred while getting version information.

View file

@ -3,7 +3,7 @@
import pytest
import pytest_httpbin
assert pytest_httpbin # for pyflakes
assert pytest_httpbin # for pyflakes
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
async def test_redirection(get_version):
@ -11,7 +11,7 @@ async def test_redirection(get_version):
"source": "httpheader",
"url": "https://www.unifiedremote.com/download/linux-x64-deb",
"regex": r'urserver-([\d.]+).deb',
}) != None
}) is not None
async def test_get_version_withtoken(get_version, httpbin):
assert await get_version("unifiedremote", {
@ -20,4 +20,4 @@ async def test_get_version_withtoken(get_version, httpbin):
"httptoken": "Basic dXNlcm5hbWU6c3VwZXJwYXNzd29yZA==",
"header": "server",
"regex": r'([0-9.]+)*',
}) != None
}) is not None

View file

@ -5,7 +5,7 @@ import base64
import pytest
import pytest_httpbin
assert pytest_httpbin # for pyflakes
assert pytest_httpbin # for pyflakes
pytestmark = pytest.mark.asyncio