Olga Matoula - Social distancing from your system’s dependencies: An API’s Story
Channel: EuroPython Conference
Date: 2020-09-15

"Social distancing from your system’s dependencies: An API’s Story
EuroPython 2020 - Talk - 2020-07-23 - Ni
Online

By Olga Matoula

Have you ever imagined life without your tests breaking due to an external dependency having changed? My team chased the dream. We used mocks, stubs, other dependency isolation techniques, and the result was … a lot of ugly tests.

We soon realized our tests required more care and they invoked some difficult questions. Is it possible that the limitations of the testing framework add or give away flaws on your design? Should your architecture be affected by your efforts to test the system? What did we learn in the process?

This presentation will introduce some testing isolation concepts and discuss how the choice of each can affect your architecture design. We will go through the basics of the unittest.mock library and the pytest framework and explore their potential. By diving into scenarios, attendees will learn where these features can be applied more effectively, and more importantly, how an API design can and should be driven by the value of testability, allowing the tests to be structured around clarity, readability and a happy Continuous Integration platform.

The target audience includes beginner Pythonistas, who are looking for ways to structure and test their code cleanly, while intermediate developers will enjoy a fun refreshment on dependency isolation and leave the session with practical examples on how to use it more effectively.



License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/
Please see our speaker release agreement for details: https://ep2020.europython.eu/events/speaker-release-agreement/

    "