4teamwork/ftw.testing — pull request #14 by jone (2014-12-27 13:01:39+00:00)
Title: Additional testing layers

This PR adds 3 additional common testing layers:

#### Component registry isolation layer

The p.a.testing layers do not isolate the component registry for each test, but only for the whole testing layer.
When additional components are added to the component registry in the tests, those components are not teared down properly.

The ``COMPONENT_REGISTRY_ISOLATION`` provides isolation between tests, so that those tests can register components and they will be removed by the testing layer when the test is finished.

It also provides a stacked configuration context (ZCML) with methods for loading ZCML from a file and from a string.

#### Temp directory layer

The ``TEMP_DIRECTORY`` simply creates a new temp directory for each test and removes it when the test is finished. The empty temp directory is available with ``self.layer['temp_directory']``

#### Console script layer

The console script layer is used for testing console scripts of a package.
It uses ``zc.buildout.testing`` for installing a sandbox buildout. The buildout installs the console script of the package under development, allowing the test to actually execute scripts and test the results.

The buildout is executed once on test setup (performance). All files added within the test are removed on tear down for isolation.