Skip to main content

Copyright (c) 2011, Robert Collins <robertc@robertcollins.net>

Licensed under either the Apache License, Version 2.0 or the BSD 3-clause license at the users choice. A copy of both licenses are available in the project source as Apache-2.0 and BSD. You may not use this file except in compliance with one of these two licences.

Unless required by applicable law or agreed to in writing, software distributed under these licenses is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the license you chose for the specific language governing permissions and limitations under that license.

Zope fixtures provides Fixtures (http://pypi.python.org/pypi/fixtures) for use with Zope tests. These permit easy unit testing in Zope environments.

Dependencies

For use in a unit test suite using the included glue, one of:

  • Python 2.7

  • unittest2

  • bzrlib.tests

  • Or any other test environment that supports TestCase.addCleanup.

Writing your own glue code is easy, or you can simply use the fixtures directly without any support code.

To run the test suite for zope_fixtures, testtools is needed.

See the Fixtures documentation for overview and design information.

Stock Fixtures

ComponentsFixture

This permits overlaying registrations in the zope registry. While the fixture is setup any registrations made are local to the fixture, and will be thrown away when the fixture is torn down.

>>> from zope_fixtures import ComponentsFixture
>>> from zope.interface import Interface, implements
>>> from zope.component import getSiteManager
>>> class ITestUtility(Interface):pass
>>> class TestUtility(object):
...     implements(ITestUtility)
>>> with ComponentsFixture():
...     getSiteManager().registerUtility(TestUtility())

UtilityFixture

This permits simple replacement of a single utility.

>>> from zope_fixtures import UtilityFixture
>>> with UtilityFixture(TestUtility()):
...     pass

Metadata

Release files for zope_fixtures 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zope_fixtures 0.0.3
File Size Uploaded Provenance Actions
zope_fixtures-0.0.3.tar.gz 11.1 kB Without provenance Details for zope_fixtures-0.0.3.tar.gz

Release files / zope_fixtures-0.0.3.tar.gz

Download URL zope_fixtures-0.0.3.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f426db92ac1f6d812711ff08b6f7486821a96e7978f7efac6117f3f884121e55
BLAKE2b-256 checksum
How to use checksums
2bc90b29e397eb383390e3b964b9d44eabe5604dd746e2875ccf4a37a55147c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for zope_fixtures 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page