Alexander Steffen - Writing unit tests for C code in Python
[EuroPython 2016]
[21 July 2016]
[Bilbao, Euskadi, Spain]
(https://ep2016.europython.eu//confere...)
There are many unit testing frameworks for C out there, but most of
them require you to write your tests in C (or C++). While there might
be good reasons to keep your implementation in C, those hardly apply
to the tests. So wouldn't it be nice to use all the power of Python
and its unit testing capabilities also for your C code? This talk will
show you how.
-----
There are many unit testing frameworks for C out there, but most of
them require you to write your tests in C (or C++). While there might
be good reasons to keep your implementation in C (for example
execution speed or resource consumption), those hardly apply to the
tests. So wouldn't it be nice to use all the power of Python and its
unit testing capabilities also for your C code?
This talk will show you how to combine CFFI and pycparser to easily
create Python unit tests for C code, without a single line of C
anywhere in the test cases. It will also cover creating mock functions
in Python, that can be used by the C code under test to hide external
dependencies. Finally, we will look at some of the challenges you
might face when trying to mix Python and C and what to do about them.
Nesta página do site você pode assistir ao vídeo on-line Alexander Steffen - Writing unit tests for C code in Python duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário EuroPython Conference 04 Agosto 2016, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 17,887 vezes e gostou 262 espectadores. Boa visualização!