Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Boast about test suite #99

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ $ pip install --require-venv immoney

### Design goals

There are a few core design aspects of this library that each eliminate entire classes
of bugs:
These core aspects of this library each eliminate entire classes of bugs:

- Exposed and internal data types are either immutable or faux immutable.
- Invalid amounts of money cannot be represented. There is no such thing as `0.001` US
dollars, and there is no such thing as negative money.
- Builtin operations never implicitly lose precision.
- Built from the ground-up with support for static type checking in mind. This means
that bugs that attempt to mix currencies can be found by a static type checker.
- A comprehensive test suite with 100% coverage, including property tests that assert
random [sequences of operations][sequence-test] behave as expected.

[sequence-test]:
https://github.com/antonagestam/immoney/blob/cc8ad48713fcf5c843e9832de9f722366b17a404/tests/test_arithmetic.py#L190

### Features

Expand Down