Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2181

Use Python's unittest (or unittest2) more widely and consistently

    XMLWordPrintableJSON

Details

    • Test
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • proton-c-0.30.0
    • None
    • build, python-binding
    • None

    Description

      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.

      Attachments

        Activity

          People

            jdanek Jiri Daněk
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: