introduce tox support
This commit is contained in:
parent
a62866a2d3
commit
9005c96d10
|
@ -8,4 +8,5 @@ __pycache__/
|
|||
*.pyo
|
||||
.travis.pub
|
||||
.pytest_cache/
|
||||
.tox/
|
||||
keyfile.toml
|
||||
|
|
|
@ -3,7 +3,17 @@
|
|||
|
||||
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):
|
||||
assert await get_version("unifiedremote", {
|
||||
|
|
|
@ -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