pytest

pytest

Mature full-featured Python testing tool that helps you write better programs

Python has a long history with testing and different testing frameworks. Over the last decade, pytest has become the most popular, mature, and extensible Python testing framework.

Debugging During Testing

Part of tutorial

Debugging During Testing
When writing tests, use the PyCharm "visual debugger" to interactively poke around in the context of a problem.
Unit Tests

Part of tutorial

Unit Tests
Write a simple test and run it in PyCharm's visual test runner.
Jump to Error

Part of tutorial

Jump to Error
Writing code means writing broken code. Click a link in a traceback to open a file on the line of the error.
Background on Testing

Part of tutorial

Background on Testing
Introduce testing, pytest, and how it all fits into PyCharm, along with a scenario to work on.
Skipping Tests

Part of tutorial

Skipping Tests
During refactoring, use pytest's markers to ignore certain breaking tests.
Test Fixtures

Part of tutorial

Test Fixtures
Make your tests more focused by moving sample data to pytest fixtures.
Getting Into the TDD Flow

Part of tutorial

Getting Into the TDD Flow
Setup your PyCharm project to help get into the flow of Test-Driven Development (TDD).
Testing for Exceptions

Part of tutorial

Testing for Exceptions
Write tests which ensure exceptions are raised when expected.
Project Setup

Part of tutorial

Project Setup
Make a PyCharm project and virtual environment with dependencies, and configure PyCharm to use pytest.
Visual Testing with pytest

Tutorial

Visual Testing with pytest
Test writing is productive and fun with PyCharm as a visual testing tool atop pytest.
pytest vs Unittest, Which is Better?

JetBrains Blog

pytest vs Unittest, Which is Better?
Two prominent choices are pytest and unittest, both of which come with their own sets of features and advantages.
Do you do enough testing? pytest to the rescue!

YouTube

Do you do enough testing? pytest to the rescue!
Join us to learn how you can use pytest to find bugs, improve code quality, and even have some fun along the way.
An Interview with Brian Okken - the pytest storyteller

JetBrains Blog

An Interview with Brian Okken - the pytest storyteller
Brian wears many hats including being a host for multiple Python podcasts and the author of Python Testing with pytest.
Productive pytest with PyCharm

YouTube

Productive pytest with PyCharm
Testing is a major part of Python development and pytest has become the leading testing framework.
Three pytest features you will love

JetBrains Blog

Three pytest features you will love
One of the most popular frameworks for Python is pytest, and it comes with several cool features.
42 Tips and Tricks

Playlist

42 Tips and Tricks
Become an IDE champ with these bite-sized tips and tricks.
Run Single Test

Tip

Run Single Test
Speed up testing by focusing on one test.