Example – integration testing with Python

In the case of Python, the example code here uses PyTest as a test framework. The example code can be found on GitHub, in the 0.7.0 branch of the repository https://github.com/kubernetes-for-developers/kfd-flask/.

You can download the example using the following command:

git clone https://github.com/kubernetes-for-developers/kfd-flask/ -b 0.7.0

In the example, I changed the code structure to move all the Python code for the application itself under the src directory, following the recommended pattern from PyTest. If you have not used PyTest before, reviewing their best practices at https://docs.pytest.org/en/latest/goodpractices.html is very worthwhile.

If you view the code or download it, you will ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.