arrow_backRetour aux issues
HafidIdrissi/Time-Tracker
#24
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Add timezone and duration-boundary tests for SQLite persistence
ecoDébutant
enhancement
help wanted
good first issue
descriptionDescription
## User problem
The database stores timezone-aware timestamps in UTC and clamps an end time that
would precede its period start. These guarantees protect activity durations,
but they are not covered directly by unit tests.
## Expected result
Add focused database tests that document UTC serialization and non-negative
duration behavior. Keep the database schema unchanged unless a test exposes a
small defect.
## Likely files
- `tests/test_database.py`
- `timetracker/database.py` only if justified by a failing test
## Acceptance criteria
- Verify that `to_utc()` rejects a naive `datetime`.
- Verify that a non-UTC aware timestamp is normalized to UTC.
- Verify that `to_storage()` emits a timezone-qualified value with millisecond
precision.
- Verify that updating a period with an end before its start stores a zero
duration and does not move the end before the start.
- Verify that the idle flag and Unicode application/title values survive a
database round trip.
- Use a temporary database and leave no generated `activity.db` in the repo.
## Test command
```powershell
python -m unittest tests.test_database -v
python -m unittest discover -v
```
Issues similaires
calkit/calkit
star53
Poids du dépôt moyen
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an implicit map…
Python
bug
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:546`) every …
Python
enhancement
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the risk badge,…
Python
enhancement
good first issue