openmicroscopy/openmicroscopy — pull request #1409 by ximenesuk (2013-08-22 13:12:26+00:00)
Title: Python integration test fixes  and introduction of pytest

This PR is two significant chunks of work rolled into one so testing all of it may not be straightforward. As there are unresolved issues, see further down, this PR can be used as a discussion area if it is not mergable

To test the Python integration tests using pytest the easiest way at present is,
```
cd components/tools/OmeroPy
./setup.py test -s test/integration/test_admin.py
```
to run an individual test module or,
```
./setup.py test -s test/integration
```
to run the complete set of Python integration tests.

Notes:
* an active user with a default group needs to be present and that user and password need to be in the server's ```ice.config``` under ```omero.user``` and ```omero.pass``` respectively.
* if testing on a Mac you may need to increase the number of file handles ``` ulimit -n 2048```.
* the complete set of tests may take 90 minutes. There are two serious offenders here ```test_thumbs.py``` takes 70 minutes and ```test_rawpixelsstore.py``` takes 10 minutes. To temporarily exclude these files simply remove test_ from their names.

The results of the tests should agree with the [Integration tests spreadsheet](https://docs.google.com/spreadsheet/ccc?key=0ArfUkRuStsCEdDNxcjY1SThOR3hMVDk2WVJFS3dXaXc) though there are occasional transient failures.

@cneves may be able to advise further on testing other parts of this PR.

This PR does not address:
* how the build system runs tests under pytest
* the conversion of the integration tests to pytest, they are currently still unittests that pytest is able to run. I have further local changes that convert some of the tests to pytest but I need to complete those before opening a further PR since it is an all or nothing set of commits.
* any further tidying of tests such as removing extraneous output
* any performance issues with ```test_thumbs.py```!