feat: add uv-based project with pytest and CI workflow
Test Workflow / test (push) Failing after 1m53s
Test Workflow / test (push) Failing after 1m53s
- Add pyproject.toml and uv.lock for Python project with uv - Add src/__init__.py with add(), multiply(), greet() functions - Add tests/test_example.py with unit tests - Add commit-message skill for Conventional Commits - Add Gitea Actions workflow to run pytest
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
from src import add, multiply, greet
|
||||
|
||||
|
||||
def test_add():
|
||||
assert add(1, 2) == 3
|
||||
assert add(-1, 1) == 0
|
||||
|
||||
|
||||
def test_multiply():
|
||||
assert multiply(2, 3) == 6
|
||||
assert multiply(0, 5) == 0
|
||||
|
||||
|
||||
def test_greet():
|
||||
assert greet("World") == "Hello, World!"
|
||||
assert greet("") == "Hello, !"
|
||||
Reference in New Issue
Block a user