diff --git a/setup.cfg b/setup.cfg index adcbe17..a7db1ae 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ # https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files [metadata] -name = hasskisok +name = hasskiosk author = Mike Bloy author_email = mike@bloy.org description = Helper application for homeassistant kiosk screens @@ -17,6 +17,7 @@ package_dir = =src packages = find: install_requires = + environs paho-mqtt [options.packages.find] diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..b97cb1e --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1 @@ +"""Test configuration and fixtures.""" diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 0000000..e8b4e3f --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,10 @@ +"""Test version number handling.""" + +from importlib_metadata import version + +from hasskiosk import __version__ + + +def test_package_version_matches_dunder_version(): + """Test that package metadata version matches the package __version__.""" + assert __version__ == version("hasskiosk") diff --git a/tox.ini b/tox.ini index b07a242..afd9a9a 100644 --- a/tox.ini +++ b/tox.ini @@ -5,12 +5,14 @@ isolated_build = True [testenv] wheel = true wheel_build_env = build +basepython = python3.7 [testenv:build] deps = setuptools [testenv:py37] deps = + importlib_metadata pytest pytest-cov pdbpp @@ -32,14 +34,12 @@ commands = [testenv:lint] deps = flake8 - flake8-bandit flake8-blind-except flake8-builtins flake8-docstrings flake8-executable flake8-isort flake8-logging-format - flake8-mypy pycodestyle pydocstyle commands = @@ -51,6 +51,7 @@ commands = [testenv:dev] # this environment lets tox create a development env quickly and easily +recreate=True deps = bpython mypy @@ -60,7 +61,6 @@ deps = {[testenv:security]deps} {[testenv:security]deps} {[testenv:lint]deps} -basepython = python3.7 envdir = {toxinidir}/.venv usedevelop = True