Skip to content

Commit

Permalink
Add initial very basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
russss committed Dec 3, 2024
1 parent 9fa73c4 commit 7697880
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
run: |
uv run ruff check
uv run mypy .
uv run pytest
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ dependencies = [
Homepage = "https://github.com/russss/polybot"

[dependency-groups]
dev = ["mypy>=1.13.0", "ruff>=0.8.1", "types-requests>=2.32.0.20241016"]
dev = [
"mypy>=1.13.0",
"ruff>=0.8.1",
"types-requests>=2.32.0.20241016",
"pytest>=8.3.4",
]

[tool.pytest.ini_options]
pythonpath = ["."]
13 changes: 13 additions & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from polybot import Bot


class BotTest(Bot):
def main(self):
pass


def test_init():
# Very basic test to exercise the initialisation code
bot = BotTest("test_bot")
assert bot.name == "test_bot"
bot.run()
48 changes: 47 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7697880

Please sign in to comment.