Gabe Hollombe

Gabe Hollombe

Audience level:
Intermediate
Thursday
4:20 p.m.–5:05 p.m.

Improve your testing with Pytest and Mock

Description

Testing code with Pytest is an absolute pleasure. Less boilerplate makes your test more concise and its fixtures system helps you share setup code while still keeping your tests clear and understandable. I'll tell you all about how to get basic unit testing done, and I'll show you how to use Voidspace's Mock library to test collaborations between your objects, too.

Abstract

Improve Your Testing with Pytest and Mock

  • Why Pytest?
  • Installation
  • Our First Test
  • Testing Exceptions
  • Context-Sensitive Comparisons
  • Classic xUnit Setup / Teardown
  • Pytest Fixtures
  • Verifying Calls with Mock
  • Stubbing Return Values
  • Monkeypatching
  • Pytest Plugins
  • Time For Questions

Platinum Sponsors:


Silver Sponsors:


Partners: