Skip to content

Commit

Permalink
fix pyproject, get tox working, add first test
Browse files Browse the repository at this point in the history
  • Loading branch information
NodeJSmith committed Jun 12, 2024
1 parent c11da57 commit 287a53e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]
include = ["otf"]
include = ["otf*"]

[project]
name = "otf-api"
Expand Down Expand Up @@ -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"]
8 changes: 8 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -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()
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[tox]
skipsdist=True
envlist = py310, py311

[testenv]
recreate = False
deps =
pytest
.[dev]
commands =
pytest
pytest

0 comments on commit 287a53e

Please sign in to comment.