Testing your Plone codebase with Pytest

Published: 14 July 2023
on channel: Six Feet Up
81
1

Testing your Plone codebase with Pytest by Érico Andrei @ Plone Foundation

Plone 6 is out, and now you create your new CMS project with a cookiecutter template, install it with pip, format the code with black, and deploy it with Docker. But you probably still test it as you did 10 or 15 years ago. Learn how to use Pytest with Plone, and make TDD fun again.

Over the last few years, the Plone community has been busy working on making Plone development more accessible to new developers with the adoption of well-known tools over homegrown solutions: The default installation of Plone is now based on pip, the recommended way to deploy is using containers, and if you want to bootstrap a new project, there is a cookiecutter template to do it. On the other hand, we still rely on the same patterns and snippets when testing the Python code of a Plone solution: Layers and test cases of Unittest, but there should be a better (more pythonic) way. Moving your tests from Unittest to Pytest is easy, and you gain access to all the features of the most comprehensive testing framework in the Python world.

In this talk, we will present the reasoning for choosing Pytest over Unittest, but also show how your tests will be easier to write and maintain.

The 5th annual Python Web Conf (#PWC2023) inspired attendees to use technology for good. The conference attracted 315 attendees from over 30 countries across 15 time zones. The highly engaging format featured 70 speakers, 5 tracks (including 64 talks and 5 tutorials) and took place virtually on March 13-17, 2023 on LoudSwarm by Six Feet Up.

More information about the conference can be found at: https://2023.pythonwebconf.com


Watch video Testing your Plone codebase with Pytest online without registration, duration hours minute second in high quality. This video was added by user Six Feet Up 14 July 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 8 once and liked it people.