Skip to content

Commit cd99dd0

Browse files
authored
Merge pull request #51 from faanskit/add-pytest
Add pytest with basic unit test coverage.
2 parents 04ca1f5 + 12814a8 commit cd99dd0

6 files changed

Lines changed: 1448 additions & 11 deletions

File tree

Dockerfile.dev

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
FROM python:3.11-slim
22

33
WORKDIR /app
4-
# Dependencies
4+
# Install all dependencies (including dev)
55
RUN pip install --no-cache-dir poetry
66
COPY pyproject.toml poetry.lock ./
7-
87
RUN poetry config virtualenvs.create false \
9-
&& poetry install --only main --no-root --no-interaction --no-ansi
10-
11-
# Dev dependencies
12-
RUN pip install black flake8
8+
&& poetry install --no-root --no-interaction --no-ansi
139

1410
ENV PYTHONPATH="${PYTHONPATH}:/app"
1511

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ For developers who prefer not to install Python locally, a Docker-based developm
232232
# Run the example
233233
docker compose -f docker-compose.dev.yml run --rm pycheckwatt-dev python examples/example.py
234234

235+
# Run the tests
236+
docker compose -f docker-compose.dev.yml run --rm pycheckwatt-dev pytest
237+
235238
# Clean up containers
236239
docker compose -f docker-compose.dev.yml down
237240
```

0 commit comments

Comments
 (0)