testtools 0.9.2

Milestone information

Project:
testtools
Series:
0.9
Version:
0.9.2
Released:
 
Registrant:
testtools developers
Release registered:
Active:
No. Drivers cannot target bugs and blueprints to this milestone.  

Download RDF metadata

Activities

Assigned to you:
No blueprints or bugs assigned to you.
Assignees:
1 Benjamin Peterson, 3 Robert Collins
Blueprints:
No blueprints are targeted to this milestone.
Bugs:
4 Fix Released

Download files for this release

After you've downloaded a file, you can verify its authenticity using its MD5 sum or signature. (How do I verify a download?)

File Description Downloads
download icon testtools-0.9.2.tar.gz (md5, sig) testtools 0.9.2 tarball 662
last downloaded 50 weeks ago
Total downloads: 662

Release notes 

Python 3 support, more matchers and better consistency with Python 2.7 --
you'd think that would be enough for a point release. Well, we here on the
testtools project think that you deserve more.

We've added a hook so that user code can be called just-in-time whenever there
is an exception, and we've also factored out the "run" logic of test cases so
that new outcomes can be added without fiddling with the actual flow of logic.

It might sound like small potatoes, but it's changes like these that will
bring about the end of test frameworks.

Changelog 

View the full changelog

Improvements
------------

* A failure in setUp and tearDown now report as failures not as errors.

* Cleanups now run after tearDown to be consistent with Python 2.7's cleanup
  feature.

* ExtendedToOriginalDecorator now passes unrecognised attributes through
  to the decorated result object, permitting other extensions to the
  TestCase -> TestResult protocol to work.

* It is now possible to trigger code just-in-time after an exception causes
  a test outcome such as failure or skip. See the testtools MANUAL or
  ``pydoc testtools.TestCase.addOnException``. (bug #469092)

* New matcher Equals which performs a simple equality test.

* New matcher MatchesAny which looks for a match of any of its arguments.

* TestCase no longer breaks if a TestSkipped exception is raised with no
  parameters.

* TestCase.run now clones test cases before they are run and runs the clone.
  This reduces memory footprint in large test runs - state accumulated on
  test objects during their setup and execution gets freed when test case
  has finished running unless the TestResult object keeps a reference.
  NOTE: As test cloning uses deepcopy, this can potentially interfere if
  a test suite has shared state (such as the testscenarios or testresources
  projects use). Use the __deepcopy__ hook to control the copying of such
  objects so that the shared references stay shared.

* Testtools now accepts contributions without copyright assignment under some
  circumstances. See HACKING for details.

* Testtools now provides a convenient way to run a test suite using the
  testtools result object: python -m testtools.run testspec [testspec...].

* Testtools now works on Python 3, thanks to Benjamin Peterson.

* Test execution now uses a separate class, testtools.RunTest to run single
  tests. This can be customised and extended in a more consistent fashion than
  the previous run method idiom. See pydoc for more information.

* The test doubles that testtools itself uses are now available as part of
  the testtools API in testtols.testresult.doubles.

* TracebackContent now sets utf8 as the charset encoding, rather than not
  setting one and encoding with the default encoder.

* With python2.7 testtools.TestSkipped will be the unittest.case.SkipTest
  exception class making skips compatible with code that manually raises the
  standard library exception. (bug #490109)

Changes
-------

* TestCase.getUniqueInteger is now implemented using itertools.count. Thanks
  to Benjamin Peterson for the patch. (bug #490111)

0 blueprints and 4 bugs targeted

Bug report Importance Assignee Status
490109 #490109 TestSkipped exception should be the same as the stdlib one 4 Medium Robert Collins  10 Fix Released
489436 #489436 testtools.tests.helpers should be promoted to be installed 6 Wishlist Robert Collins  10 Fix Released
490111 #490111 getUniqueInteger might be simpler 6 Wishlist Benjamin Peterson  10 Fix Released
496092 #496092 Hook for handling 'did not pass tests' 6 Wishlist Robert Collins  10 Fix Released
This milestone contains Public information
Everyone can see this information.