[TIP] Supplying variable options to unittest2 tests

Matěj Cepl mcepl at cepl.eu
Wed Jun 22 14:21:17 PDT 2016


On 2016-06-22, 14:08 GMT, Perry Johnson wrote:
> I hope this is the right mailing list for this type of 
> question, but I am trying to work with unittest to run through 
> test cases, and I am just not understanding how to do what 
> I need to do.  Knowledge wise I am a step up from beginner at 
> Python, and I am without a formal CS degree.  If I should go 
> to another list, please, let me know which one, and accept my 
> apologies.

It is possible to have generated test cases (if that's what you 
want) just with unittest. See 
http://stackoverflow.com/questions/32899/ and 
http://stackoverflow.com/questions/2798956/. Also, an example 
how I use it in my package yamlish_ could be see on 
https://gitlab.com/mcepl/yamlish/blob/master/test/__init__.py 
and for example 
https://gitlab.com/mcepl/yamlish/blob/master/test/test_reader.py

Best,

Matěj Cepl

.. _yamlish:
    https://pypi.python.org/pypi/yamlish/

-- 
https://matej.ceplovi.cz/blog/, Jabber: mcepl at ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
I must not fear. // Fear is the mind-killer. // Fear is the
little-death that brings total obliteration. // I will face my
fear. // I will permit it to pass over me and through me. // And
when it has gone past I will turn the inner eye to see its path.
// Where the fear has gone there will be nothing. // Only I will
remain.
  -- Dune




More information about the testing-in-python mailing list