We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
← All tracks
0 / 4
Tests That Earn Their Keep
Pythonpytest layout, fixtures, parametrisation, injection over patching, property-based testing and typed test suites.
This track is written for Python, which isn't the mode you're browsing in.
0
/ 8 solved
· 11 articles
- 1. pytest Project Layout: conftest, rootdir, Import Modes Read
- 2. pytest 9 Configuration and Unified Strict Mode Read
- 3. Fixtures: Scope, Teardown, Factories, Autouse Read
- 4. Not solved yet. Fixture setup and teardown order
- 5. Why Constructor Injection Beats mock.patch Read
- 6. Not solved yet. A rate limiter with an injected clock
- 7. parametrize: Tables of Cases Instead of Loops of Asserts Read
- 8. Not solved yet. Reimplementing pytest's parametrize expansion
- 9. Property-Based Testing: Naming the Thing That Is Always True Read
- 10. Not solved yet. Four properties for one codec
- 11. Stateful Testing: Letting the Machine Find the Sequence Read
- 12. Not solved yet. Minimal counterexamples for an LRU cache
- 13. Not solved yet. Mutation testing: scoring a test suite
- 14. Typing Your Test Suite Under --strict Read
- 15. Not solved yet. A typed factory fixture
- 16. Deterministic Tests for Concurrency Read
- 17. Not solved yet. Detecting leaked tasks and forcing a race
- 18. What to Test and What Not To Read
- 19. S101 and Per-File Rule Scoping Read
Check yourself
4 questions · one attempt eachThese do not count toward finishing the track. They are here to catch the things that are easy to read past.
Two tests pass alone but fail when run together. What is the usual cause?
CACHE = {} # module level
def test_a(): CACHE['k'] = 1; ...
def test_b(): assert 'k' not in CACHE
Question 1 of 4