Hello everyone,

one of the discussion we had during connect was to find (and use) a
common testing framework for unit (and maybe beyond) tests.
What we should use is probably a framework that still supports all the
unittest based tests we already have in our projects.

Following also other people suggestions, I looked around and did some
initial tests. What follows is a list of what we could use:

- pytest: http://pytest.org/latest/
- nose: https://nose.readthedocs.org/en/latest/
- stick with Python provided unittest: no need to install anything else

Personally I do not dislike unittest even if of the three is the most
verbose, but pytest is a powerful handy tool and easier to use (you
don't even need to inherit from TestCase).

I didn't play with pytest and Django tests, but looks like it is
possible to easily integrate it:

http://pytest-django.readthedocs.org/en/latest/

Tools:

These kind of tools are more targeted at mocking/patching objects or
behavior, should we avoid them or use them? (no flame wars please! :-)
Personally I find that sometimes (probably too often) I need them. If
we need them we should suggest which one to use, and stick with it:

- mock: http://www.voidspace.org.uk/python/mock/
- mocker: https://pypi.python.org/pypi/mocker

There are more, but these two are the ones I know about or have been using.
Other suggestions?

Ciao!

--
Milo Casagrande | Automation Engineer
Linaro.org <www.linaro.org> │ Open source software for ARM SoCs

_______________________________________________
linaro-validation mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/linaro-validation

Reply via email to