Productive pytest with PyCharm

Testing is a major part of Python development and pytest has become the leading testing framework.

View at original site


Guest: Brian Okken

Brian is also the author of Python Testing with pytest and has recently launched his new pytest course. Mostly, he spends his free time telling people they should write good, clean automated tests, specifically using pytest.

Brian shows:

  • Good style for asserts
  • Refactoring verbose tests into fixtures and conftest.py files
  • Refactoring fixtures
  • Using parameterize to repeat similar tests
  • Other uses of markers
  • Coverage
  • Good TDD style

Along the way, Brian will use the productive PyCharm testing features from the first webinar.

Related Resources

Background on Testing
Background on Testing
Introduce testing, pytest, and how it all fits into PyCharm, along with a scenario to work on.
Test Fixtures
Test Fixtures
Make your tests more focused by moving sample data to pytest fixtures.
Debugging During Testing
Debugging During Testing
When writing tests, use the PyCharm "visual debugger" to interactively poke around in the context of a problem.