Merged
Merged
Conversation
| I spoke about the Arrange Act Assert pattern and how it can help clean up unit | ||
| tests. I plan to write a short guide to AAA for Python developers and will | ||
| link to that from here when done - meanwhile, below are my slides and links | ||
| link to that from here when done - meanwhile, below is the video of the talk, my slides and links |
|
|
||
| Thanks again to `Carles <https://github.com/txels>`_ for introducing me to the | ||
| AAA pattern. Check out his `data driven tests library | ||
| <https://github.com/txels/ddt>`_. |
| :status: draft | ||
|
|
||
| This is the first post in a series exploring the Arrange Act Assert pattern and | ||
| how to apply it to Python unit tests. |
|
|
||
| I'll now go into detail on each of these parts using Pytest and a simple toy | ||
| test example. We'll write a simple happy-path test for Python's builtin | ||
| ``list.reverse`` function. |
| * We all love `PEP008 <https://www.python.org/dev/peps/pep-0008/>`_, so we want | ||
| tests to pass ``flake8`` linting. | ||
|
|
||
| * `PEP020 <https://www.python.org/dev/peps/pep-0020/>`_ is also something we |
| Docstring | ||
| --------- | ||
|
|
||
| A short single line statement about the behaviour under test. |
| will explore strategies for extracting common assertion code and testing it | ||
| in its own right. | ||
|
|
||
| Links will appear above when I complete these follow up posts. |
Labels
None yet