Online Absolute Beginner Python Tutorials
Every Sunday 2pm (UK time/ BST)
by Cheuk Ting Ho
Get this slide deck:
slides.com/cheukting_ho/python-tdd
Python objects - int, float, str, list, dict, bool
Control flows - if-else, for loop, while loop
Functions, modeuls, classes and decorators
strings operations and regex with re
pytest with fixtures and mock
property-based testing
python linters & auto-formatters
unit testing is a software testing method by which individual units of source code... are tested to determine whether they are fit for use. - en.wikipedia.org/wiki/Unit_testing
First your program are structured in units: e.g. functions, classes, modules
Making sure a functions works as it is supposed to locks that pieces of code in place
Most basic piece of testing, to test everything we need other tests. e.g. integration testing, end-to-end testing etc
Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the code is improved so that the tests pass.
- wikipedia
😃
😞
But also read 5 Excuses for Not Doing TDD, Debunked
When your task can be break down into isolated modules.
TDD lends itself really well to when you have a pure logic function that you need to write. When the work you need to do has a clearly defined set of expected inputs and outputs, it's a great signal that you should use TDD to build out your tests and code.
Sunday 2pm (UK time/ BST)
There are also Mid Meet Py every Wednesday 1pm
Testing month in June