We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Testing your Plone codebase with Pytest

Formale Metadaten

Titel
Testing your Plone codebase with Pytest
Serientitel
Anzahl der Teile
36
Autor
Lizenz
CC-Namensnennung 3.0 Deutschland:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
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.