No video

Unit testing using monkey patching in pytest - Vikram Bhat

  Рет қаралды 6,491

SF Python

SF Python

Күн бұрын

This talk was presented at PyBay2019 - 4th annual Bay Area Regional Python conference. See pybay.com for more details about PyBay and click SHOW MORE for more information about this talk.
Description
Unit testing is loved by so many that it is already a very popular concept. But I will try to make unit testing even simpler with pytest using monkey patching. Come to learn about unit testing with pytest using monkey patching.
Abstract
Everyone loves unit testing. Developers rarely submit code for reviews without adding unit testing. But can we make this writing unit tests even simpler in Python?
PyTest provides us with an amazing set of tools and libraries to write functional tests, but can PyTest be used for Unit testing also? Of course it can! Not only can you write simple unit tests with PyTest, you can write tests for complex logic as well as code which depend on external services using PyTest. Having worked on PyTest for the last 5 years, I was amazed at the power and capabilities of PyTests for writing quality tests.
Monkey Patching is a common concept, but it is not used widely outside of unit-tests. Python has its own internal libraries for writing unit tests and mocking, MonkeyPatching using PyTest makes the tests a lot simpler to write..
We will cover how PyTest, MonkeyPatching and Unit tests come together to not only make it easy to write tests, but also make it fun.
This talk is for all levels and does not require any specific knowledge of PyTest.
Original slides: t.ly/XZWn5
About the speaker
Vikram is a software engineer from the Bay Area and has worked at companies like Sony PlayStation and Box. He has been working on Python for the last 5 years mainly in the areas of software automation, tools, infrastructure and software testing. He really enjoys building tools using Python and learning about best practices in coding and software testing.
Sponsor Acknowledgement
This and other PyBay2019 videos are via the help of our media partner AlphaVoice (www.alphavoice...!
#pybay #pybay2019 #python #python3 #gdb

Пікірлер: 5
@kevinlao3690
@kevinlao3690 3 жыл бұрын
16:24 is where he starts going over the different helper methods.
@bjornmartin6480
@bjornmartin6480 3 жыл бұрын
I know Im kind of off topic but do anyone know of a good site to watch newly released tv shows online?
@plouf1969
@plouf1969 Жыл бұрын
I like the presentation slides. Very clear.
@kleytonlima6900
@kleytonlima6900 4 жыл бұрын
Great speak, very didatic!
@pablonathan3310
@pablonathan3310 2 жыл бұрын
very good, helped me a lot
Why you should be using structured logs - Stefan Krawczyk
30:23
SF Python
Рет қаралды 4,5 М.
Yum 😋 cotton candy 🍭
00:18
Nadir Show
Рет қаралды 7 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 20 МЛН
Python Testing 201 with pytest
1:01:53
Matt Layman
Рет қаралды 21 М.
Understanding Concurrency in Python! - Annie Cook
26:44
SF Python
Рет қаралды 918
Unit Testing for Data Scientists - Hanna Torrence
39:11
PyData
Рет қаралды 26 М.
Learn Pytest in 60 Minutes : Python Unit Testing Framework
1:03:19
ProgrammingKnowledge
Рет қаралды 150 М.
Lisa Roach - Demystifying the Patch Function   - PyCon 2018
37:07
PyCon 2018
Рет қаралды 46 М.
The Mental Game of Python - Raymond Hettinger
1:10:00
SF Python
Рет қаралды 123 М.
Automated testing with pytest and fixtures
27:17
PyGotham 2017
Рет қаралды 25 М.
Elizaveta Shashkova - Monkey-patching: a magic trick or a powerful tool?
22:18
EuroPython Conference
Рет қаралды 5 М.
Yum 😋 cotton candy 🍭
00:18
Nadir Show
Рет қаралды 7 МЛН