Changes
2.3.4 (31 January 2012)
- Fixed compatibility with Python 2.5
- Fixed compatibility with Python 2.7
- Development model moved to continuous integration using Jenkins.
- Introduced Tox based testing to ensure packaging and
dependencies are as expected.
- 100% line and branch coverage with tests.
- Mark test_datetime, test_date and
test_time such that nose doesn’t mistake them as tests.
2.3.3 (12 December 2011)
- Fixed a bug where when a target was replaced more than once using a
single Replacer, restore() would not
correctly restore the original.
2.3.2 (10 November 2011)
- Fixed a bug where attributes and keys could not be
removed by a Replacer as described in
Removing attributes and dictionary items if the attribute or key might not be
there, such as where a test wants to ensure an os.environ
variable is not set.
2.3.1 (8 November 2011)
- Move to use nose for running
the TestFixtures unit tests.
- Fixed a bug where tdatetime.now() returned an instance of the
wrong type when tzinfo was passed in
strict mode.
2.3.0 (11 October 2011)
- Replacer, TempDirectory, LogCapture and
TestComponents instances will now warn if the
process they are created in exits without them being cleaned
up. Instances of these classes should be cleaned up at the end of
each test and these warnings serve to point to a cause for possible
mysterious failures elsewhere.
2.2.0 (4 October 2011)
- Add a strict mode to
test_datetime and test_date.
When used, instances returned from the mocks are instances of those
mocks. The default behaviour is now to return instances of the real
datetime and date classes
instead, which is usually much more useful.
2.1.0 (29 September 2011)
- Add a strict mode to
compare(). When used, it ensures that
the values compared are not only equal but also of the same
type. This mode is not used by default, and the default mode
restores the more commonly useful functionality where values of
similar types but that aren’t equal give useful feedback about
differences.
2.0.1 (23 September 2011)
- add back functionality to allow comparison of generators with
non-generators. See the docs for details.
2.0.0 (23 September 2011)
- compare() now uses a registry of comparers that can be
modified either by passing a registry option to compare()
or, globally, using the register() function.
- added a comparer for set instances to compare().
- added a new show_whitespace parameter to
compare_text(), the comparer used when comparing
strings and unicodes with compare().
- The internal queue for test_datetime is now considered to
be in local time. This has implication on the values returned from
both now() and utcnow() when
tzinfo is passed to the test_datetime constructor.
- set() and add() on test_date,
test_datetime and test_time now accept instances
of the appropriate type as an alternative to just passing in the
parameters to create the instance.
- Refactored the monolithic __init__.py into modules for each
type of functionality.
1.12.0 (16 August 2011)
- Add a captured property to
OutputCapture so that more complex assertion can be made
about the output that has been captured.
- OutputCapture context managers can now be temporarily
disabled using their disable() method.
- Logging can now be captured only when it exceeds a specified logging
level.
- The handling of timezones has been reworked in both
test_datetime() and test_time(). This is not backwards
compatible but is much more useful and correct.
1.11.2 (28 July 2011)
- Fix for 1.10 and 1.11 releases that didn’t include non-.py files as
a result of the move from subversion to git.
1.11.0 (27 July 2011)
- Give more useful output when comparing dicts and their subclasses.
- Turn should_raise into a decorator form of
ShouldRaise rather than the rather out-moded wrapper
function that it was.
1.9.1 (11 March 2011)
- Fix bug when ShouldRaise context managers incorrectly
reported what exception was incorrectly raised when the incorrectly
raised exception was a KeyError.
1.9.0 (11 February 2011)
- Added TestComponents for getting a sterile
registry when testing code that uses zope.component.
1.7.0 (20 January 2010)
- fixed a bug where the @replace decorator passed a classmethod
rather than the replacment to the decorated callable when replacing
a classmethod
- added set method to test_date, test_datetime and test_time to allow
setting the parameters for the next instance to be returned.
- added delta and delta_type parameters to test_date,test_datetime and
test_time to control the intervals between returned instances.
1.6.2 (23 September 2009)
- changed Comparison to use __eq__ and __ne__ instead of the
deprecated __cmp__
- documented that order matters when using Comparisons with objects
that implement __eq__ themselves, such as instances of Django
models.
1.6.1 (06 September 2009)
- @replace and Replacer.replace can now replace attributes that may
not be present, provided the strict parameter is passed as False.
- should_raise now catches BaseException rather than Exception so
raising of SystemExit and KeyboardInterrupt can be tested.
1.6.0 (09 May 2009)
- added support for using TempDirectory, Replacer and LogCapture as
context managers.
- fixed test failure in Python 2.6.
1.5.4 (11 Feb 2009)
- fix bug where should_raise didn’t complain when no exception
was raised but one was expected.
- clarified that the return of a should_raise call will be None
in the event that an exception is raised but no expected
exception is specified.
1.5.3 (17 Dec 2008)
- should_raise now supports methods other than __call__
1.5.2 (14 Dec 2008)
- added makedir and check_dir methods to TempDirectory and added
support for sub directories to read and write
1.5.1 (12 Dec 2008)
- added path parameter to write method of TempDirectory so
that the full path of the file written can be easilly obtained
1.5.0 (12 Dec 2008)
- added handy read and write methods to TempDirectory for
creating and reading files in the temporary directory
- added support for rich comparison of objects that don’t support
vars()
1.4.0 (12 Dec 2008)
- improved representation of failed Comparison
- improved representation of failed compare with sequences
1.3.1 (10 Dec 2008)
- fixed bug that occurs when directory was deleted by a test that
use tempdir or TempDirectory
1.3.0 (9 Dec 2008)
- added TempDirectory helper
- added tempdir decorator
1.2.0 (3 Dec 2008)
- LogCaptures now auto-install on creation unless configured otherwise
- LogCaptures now have a clear method
- LogCaptures now have a class method uninstall_all that uninstalls
all instances of LogCapture. Handy for a tearDown method in doctests.
1.1.0 (3 Dec 2008)
- add support to Comparisons for only comparing some attributes
- move to use zope.dottedname