pytest-plone#
pytest-plone is a pytest plugin that provides fixtures and helpers to test Plone add-ons.
It builds on zope.pytestlayer, turning the plone.testing layers you already have into pytest fixtures.
You write plain function-style tests, and the Plone site arrives as an argument.
def test_portal_title(portal):
assert portal.title == "Plone site"
Where to go next#
Tutorial
New to pytest-plone?
Write your first test for an add-on, start to finish.
How-to guides
Solve a specific problem: set the plugin up, test an add-on install, speed up a slow suite.
Reference
Look something up: every fixture, every marker, the fixtures_factory API.
Explanation
Understand the machinery: testing layers, fixture scopes, and how isolation works.