490f92935e
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
17 lines
306 B
Python
17 lines
306 B
Python
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, !" |