askrobots / dbbasic-object-primitive
Public
Python functions as REST objects, with clustering, load balancing and state replication; no containers or orchestration.
__init__.py · 880 bytes · 27 lines
| 1 | """ |
| 2 | Test suite for the Object Primitive System. |
| 3 | |
| 4 | Test structure: |
| 5 | - unit/ - Unit tests (fast, isolated) |
| 6 | - integration/ - Integration tests (slower, use external resources) |
| 7 | - e2e/ - End-to-end tests (slowest, full system) |
| 8 | - fixtures/ - Shared test fixtures and helpers |
| 9 | |
| 10 | Run tests: |
| 11 | pytest # All tests |
| 12 | pytest tests/unit # Unit tests only |
| 13 | pytest tests/integration # Integration tests only |
| 14 | pytest -m unit # Tests marked as unit |
| 15 | pytest -k "test_loader" # Tests matching name |
| 16 | pytest --cov # With coverage |
| 17 | |
| 18 | Philosophy: |
| 19 | Tests are critical. The primitives must work perfectly. |
| 20 | Test-first development (TDD) throughout. |
| 21 | |
| 22 | Unit tests should be fast (<1ms each). |
| 23 | Integration tests can be slower (<100ms each). |
| 24 | E2E tests can be slowest (<1s each). |
| 25 | |
| 26 | Aim for 100% coverage on core primitives. |
| 27 | """ |