Jiri Daněk created PROTON-2181:
----------------------------------
Summary: Use Python's unittest (or unittest2) more widely and
consistently
Key: PROTON-2181
URL: https://issues.apache.org/jira/browse/PROTON-2181
Project: Qpid Proton
Issue Type: Test
Components: build, python-binding
Affects Versions: proton-c-0.30.0
Reporter: Jiri Daněk
Assignee: Jiri Daněk
There are various workarounds regarding the older {{unittest}} package versions
in the codebase.
* the one implemented in PROTON-1001
* another one implemented in PROTON-1129
* the custom test framework itself, in python/tests/proton_tests/main.py
* even more?
Using the custom test framework is a barrier for contributions, because people
are more generally familiar with the stdlib {{unittest}} module.
Using variously monkeypatched unittest to deal with Python versions ranging
from 2.6 up is not ideal either.
One solution could be to vendor in a copy of the unittest2 sources into proton
repository. The unittest2 module has not been updated since 2015 and is
licensed under BSD, so it is compatible with Apache license.
Another would be to just use unittest2 if available in the environment. If not
available, some (new) tests could be just skipped. This is what is being done
regarding ruby and the minitest library. Qpid Dispatch does this as well.
One feature of the custom test framework that unittest does not support
(without plugins) is JUnit XML reporting. Good way to get XML reporting with
unittest is to run the tests using pytest library.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]