Simon Willison’s Weblog

Subscribe

Posts tagged python, testing in 2023

Filters: Year: 2023 × python × testing × Sorted by date

pytest-icdiff (via) This is neat: “pip install pytest-icdiff” provides an instant usability upgrade to the output of failed tests in pytest, especially if the assertions involve comparing larger strings or nested JSON objects.

# 3rd June 2023, 4:59 pm / python, testing, pytest

pyfakefs usage (via) New to me pytest fixture library that provides a really easy way to mock Python’s filesystem functions—open(), os.path.listdir() and so on—so a test can run against a fake set of files. This looks incredibly useful.

# 1st February 2023, 10:37 pm / luke-plant, python, testing, pytest

Types

Years

Months

Tags