-
Notifications
You must be signed in to change notification settings - Fork 0
jamesbroadhead/pyconuk2015-testing_and_async
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Slightly updated version of the code & tests from my pyconuk 2015 talk, "Testing & Async, a journey" Licence: Apache Talk in extreme brief: timing x when is processing complete? it safe to assert? ✔ now we control the inner interface, we can return a deferred when complete inconsistent interface x more tests, make more work for caller ✔ always returns a consistent type (Deferred or subclass) mutation of state (request object) x hard to make assertions ✔ easy to compare behaviourless model object (also includes resource01, resource02 to demonstrate pyflakes, pylint) Run linting/tests: `make lint` `make test` Bonus Content slide: Behaviour-less Model objects <-> Generated Tests (cf. ‘hypothesis’) ○ GOTO David MacIver’s talk “Finding more bugs..” or ○ Tom Viner “Failure-seeking missiles” Composition over Inheritance ○ real-services integration testing ○ local-services integration testing ○ stubbed-services integration testing ○ easier mocking (compose in a mock instead of monkey-patching) Mutation testing “I already have 100% coverage” -- mutpy video: Gary Bernhardt on Boundaries (also, “the clean architecture”) pylint -- use it! (eliminate whole category of bugs, hence fewer tests)
About
pyconuk2015-testing_and_async
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published