diff --git a/pyproject.toml b/pyproject.toml index b8df0e9..9904f62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["src"] -include = ["otf"] +include = ["otf*"] [project] name = "otf-api" @@ -32,3 +32,16 @@ dependencies = [ "pydantic==2.7.3", "pycognito==2024.5.1", ] + + +[project.optional-dependencies] +dev = [ + "pytest==8.2.2", + "pytest-loguru==0.4.0", + "pytest-asyncio==0.23.7", + "aioresponses==0.7.6", + "tox==4.15.1", +] + +[tools.pytest.ini_options] +pythonpath = ["src"] diff --git a/tests/test_api.py b/tests/test_api.py new file mode 100644 index 0000000..2c04fba --- /dev/null +++ b/tests/test_api.py @@ -0,0 +1,8 @@ +import pytest +from otf.api import Api + + +@pytest.mark.asyncio +async def test_api_raises_error_if_no_username_password(): + with pytest.raises(TypeError): + await Api.create() diff --git a/tox.ini b/tox.ini index 223985a..a775f84 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,10 @@ [tox] +skipsdist=True envlist = py310, py311 [testenv] +recreate = False deps = - pytest + .[dev] commands = - pytest + pytest \ No newline at end of file