Changes#
4.1.1 (unreleased)#
Nothing changed yet.
4.1.0 (2024-04-10)#
Add support for, and require, testgres 1.10. This is needed because they changed the signature for
get_pg_version
.Drop support for Python 3.8 and 3.9.
4.0.0 (2023-10-24)#
Add support for Python 3.10, 3.11 and 3.12.
Drop support for Python 2 and Python 3.6 and 3.7.
Add a layer for working with a
testgres
Postgres instance.Add methods to the test base classes to support
unittest.mock
patches.
3.1.0 (2021-09-08)#
Add support for Python 3.9.
Drop support for Python 3.5.
Add the module alias
nti.testing.mock
, which is either the standard libraryunittest.mock
, or the backportmock
. This allows easy imports when backwards compatibility matters.Make
mock
,mock.Mock
and various other API attributes, likeis_true
, available directly from thenti.testing
namespace.
3.0.0 (2020-06-16)#
Add support for Python 3.8.
Require zope.interface 5.1. This lets the interface matchers produce much more informative error messages.
Add
nti.testing.zodb
with helpers for dealing with ZODB. This makes ZODB 5.6 or above a required dependency.
2.2.1 (2019-09-10)#
Make transaction cleanup safer if the default transaction manager has been made explicit.
Also, reset the default transaction manager to implicit.
See issue 17.
2.2.0 (2018-08-24)#
Add support for Python 3.7.
Make
time_monotonically_increases
also handletime.gmtime
and add a helper for using it in layers.
2.1.0 (2017-10-23)#
Make
Acquisition
an optional dependency. If it is not installed, theaq_inContextOf
matcher will always return False.Remove dependency on
fudge
. Instead, we now useunittest.mock
on Python 3, or its backportmock
on Python 2. See issue 11.Refactor ZCML configuration support to share more code and documentation. See issue 10.
The layer
ConfiguringLayerMixin
and the base classSharedConfiguringTestBase
now default to running configuration in the package the subclass is defined in, just as subclasses ofConfiguringTestBase
did.
2.0.1 (2017-10-18)#
The validation matchers (
validated_by
andnot_validated_by
) now consider it a failure (by default) if the validate method raises anything other thanzope.interface.exceptions.Invalid
(which includes thezope.schema
exceptions likeWrongType
). Previously, they accepted any exception as meaning the object was invalid, but this could hide bugs in the actual validation method itself. You can supply theinvalid
argument to the matchers to loosen or tighten this as desired. (Givinginvalid=Exception
will restore the old behaviour.) See issue 7.
2.0.0 (2017-04-12)#
Add support for Python 3.6.
Remove
unicode_literals
.Substantially rework
time_monotonically_increases
for greater safety. Fixes issue 5.
1.0.0 (2016-07-28)#
Add Python 3 support.
Initial PyPI release.