Some sections of the Lumiera website document meeting minutes, discussion protocols and design proposals from the early days of the project; these pages were initially authored in the »Moin Moin Wiki« operated by Cehteh on pipapo.org at that time; this wiki backed the first publications of the »Cinelerra-3« initiative, which turned into the Lumiera project eventually. Some years later, those pages were transliterated into Asciidoc semi-automatically, resulting in a lot of broken markup and links. This is a long standing maintenance problem problem plaguing the Lumiera website, since those breakages cause a lot of warnings and flood the logs of any linkchecker run.
84 lines
2.7 KiB
Text
84 lines
2.7 KiB
Text
Design Process : Unit Tests Python
|
|
==================================
|
|
|
|
|
|
[options="autowidth"]
|
|
|====================================
|
|
|*State* | _Dropped_
|
|
|*Date* | _2007-06-17_
|
|
|*Proposed by* | Ichthyostega
|
|
|====================================
|
|
|
|
|
|
UnitTests in Python
|
|
-------------------
|
|
|
|
Use the Python scripting language for the actual Unit Tests and access the
|
|
Cinelerra Code via SWIG
|
|
|
|
|
|
Description
|
|
~~~~~~~~~~~
|
|
|
|
Define Test classes in Python, using e.g. the PyUnit framework of the
|
|
Python Standard lib. The SWIG compiler can generate wrapper code automatically,
|
|
so we can access the C++ Classes and Facilities of Cinelerra as Python Modules
|
|
and Classes. The Classes to be tested in Cinelerra need to provide some
|
|
Interface for carrying out these tests (and this is one of the main benefits of
|
|
the whole Test driven aproach).
|
|
|
|
|
|
Tasks
|
|
^^^^^
|
|
* Find out how the SWIG generated wrappers play together with Python's List
|
|
and Map types. Without the ability to use the latter in the tests, this
|
|
whole proposal is rather pointless.
|
|
* Think on how we can test video data processing (at least in its basics, e.g.
|
|
does additive overlay work)
|
|
|
|
|
|
Pros
|
|
^^^^
|
|
Programming Unit and Self tests in a Scripting language facilitates this task.
|
|
The X-Language bindings are quite usable today. As a side effect, it helps to
|
|
get a clean program structure, because the tests need some Interface and/or
|
|
some object factories to create the test candidates. Python is proposed,
|
|
because it is fairly mainstream, has a flat learning curve and but is
|
|
moderately modern and functional-style at the same time.
|
|
|
|
Cons
|
|
^^^^
|
|
* Adds to the complexity
|
|
* Some old-style hackers have a quite distinct aversion against Python
|
|
|
|
|
|
|
|
Rationale
|
|
~~~~~~~~~
|
|
|
|
Why am I proposing this? Out of lazyness. Python is there, many devs (on linux)
|
|
have some Python skills, SWIG is not overly complicated to use.
|
|
|
|
And last but not least: just to get the discussion going... 😉
|
|
|
|
|
|
Comments
|
|
--------
|
|
|
|
I'd rather consider to use some embedded language in cinelerra which we can
|
|
use to drive tests, should be something smaller and more sane than python.
|
|
needs certainly more discussion. For simple unit tests some C/C++ harness and
|
|
bit shell scripting would suffice, I really want to integrate this with
|
|
https://nobug.pipapo.org/[NoBug].
|
|
|
|
ct:: '2007-06-17T17:32:27Z'
|
|
|
|
Since Lumiera is a separate project now, we do no longer need to ``hook''
|
|
into existing code ``from the outside''. Rather, we have created our own
|
|
lightweight unit testing framework in C++.
|
|
This RfC was link:{ldoc}/devel/meeting_summary/2008-03-06.html#_idea_unit_tests_in_python[dropped 3/08]
|
|
|
|
ichthyo:: '2008-03-06'
|
|
|
|
''''
|
|
Back to link:/x/DesignProcess.html[Lumiera Design Process overview]
|