mirror of
https://github.com/lilydjwg/nvchecker
synced 2024-12-17 20:24:47 +00:00
introduce tox support
This commit is contained in:
parent
a62866a2d3
commit
9005c96d10
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,4 +8,5 @@ __pycache__/
|
|||||||
*.pyo
|
*.pyo
|
||||||
.travis.pub
|
.travis.pub
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
|
.tox/
|
||||||
keyfile.toml
|
keyfile.toml
|
||||||
|
@ -3,7 +3,17 @@
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
lxml_available = True
|
||||||
|
try:
|
||||||
|
import lxml
|
||||||
|
except ImportError:
|
||||||
|
lxml_available = False
|
||||||
|
|
||||||
|
pytestmark = [
|
||||||
|
pytest.mark.asyncio,
|
||||||
|
pytest.mark.needs_net,
|
||||||
|
pytest.mark.skipif(not lxml_available, reason="needs lxml"),
|
||||||
|
]
|
||||||
|
|
||||||
async def test_xpath_ok(get_version):
|
async def test_xpath_ok(get_version):
|
||||||
assert await get_version("unifiedremote", {
|
assert await get_version("unifiedremote", {
|
||||||
|
16
tox.ini
Normal file
16
tox.ini
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[tox]
|
||||||
|
isolated_build = True
|
||||||
|
# you may find `tox --skip-missing-interpreters=true` helpful.
|
||||||
|
envlist = py3{7,8,9,10}
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
usedevelop = false
|
||||||
|
deps =
|
||||||
|
pytest
|
||||||
|
pytest-asyncio
|
||||||
|
pytest-httpbin
|
||||||
|
flaky
|
||||||
|
extras =
|
||||||
|
htmlparser
|
||||||
|
passenv = KEYFILE
|
||||||
|
commands = pytest -r fEs {posargs}
|
Loading…
Reference in New Issue
Block a user