Alexander Steffen - Writing unit tests for C code in Python
Alexander Steffen - Writing unit tests for C code in Python
[EuroPython 2016]
[21 July 2016]
[Bilbao, Euskadi, Spain]
(https://ep2016.europython.eu//conference/talks/writing-unit-tests-for-c-code-in-python)
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.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Alexander Steffen - Writing unit tests for C code in Python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.