Download fixtures/sample_pkg/tests/test_mathops.py from tailot/codex-python: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/datasets/tailot/codex-python/resolve/main/fixtures/sample_pkg/tests/test_mathops.py
- Command line
-
hf download hf://datasets/tailot/codex-python/fixtures/sample_pkg/tests/test_mathops.py
-
curl -L -o test_mathops.py https://huggingface.co/datasets/tailot/codex-python/resolve/main/fixtures/sample_pkg/tests/test_mathops.py
379 Bytes
| """Tests for src.mathops.""" | |
| from src.mathops import BoundedAccumulator, add_numbers, double_sum | |
| def test_add_numbers() -> None: | |
| assert add_numbers(2, 3) == 5 | |
| def test_double_sum() -> None: | |
| assert double_sum(2, 3) == 10 | |
| def test_bounded_accumulator() -> None: | |
| acc = BoundedAccumulator(limit=5, initial=1) | |
| assert acc.add(3) == 4 | |
| assert acc.add(10) == 5 | |