Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Unittest AsyncMock
Search
Pranay Suresh
February 05, 2020
Technology
0
150
Unittest AsyncMock
Talk about how to mock async methods in different versions of Python
Pranay Suresh
February 05, 2020
Tweet
Share
More Decks by Pranay Suresh
See All by Pranay Suresh
Event Driven Architecture
bottlejammy
0
14
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
37
Other Decks in Technology
See All in Technology
長文から長文を生成するLLMツールをオープンソースで作ってみた。
tomohisa
2
150
ハイパフォーマンスな組織をつくるための開発生産性の考え方 / developer-productivity-high-performer-link-and-motivation
lmi
3
280
単回帰分析について数式を追いながら実装してみた
kentaitakura
0
510
Oracle Database で機械学習を始めよう! Oracle Machine Learning
oracle4engineer
PRO
1
140
エンジニア候補者向け資料2024.03.28.pdf
macloud
0
2.9k
Why do you get AWS certificates
hirosys
0
120
OpenTelemetry実践 はじめの一歩
taxin
0
330
エンジニアブランディングチームの KPI / KPI's of engineer branding team
chaspy
1
140
統計的学習理論読み Chapter 1
kmatsui
4
990
データマネジメントを支える武器としてのメタデータ管理
10xinc
2
950
AMLD 2024 - Build Your Own GPT
donlelef
1
260
生成AIの不確実性と向き合うためのオブジェクト指向設計
tkikuchi1002
2
700
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
75
4.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
1.9k
Docker and Python
trallard
33
2.6k
Rails Girls Zürich Keynote
gr2m
91
13k
Optimizing for Happiness
mojombo
369
69k
Visualization
eitanlees
135
14k
Code Reviewing Like a Champion
maltzj
512
39k
YesSQL, Process and Tooling at Scale
rocio
160
13k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Building Flexible Design Systems
yeseniaperezcruz
317
37k
Making Projects Easy
brettharned
106
5.4k
jQuery: Nuts, Bolts and Bling
dougneiner
57
7.1k
Transcript
Unittest AsyncMock https://pranaysuresh.com/ https://www.linkedin.com/in/pranaysuresh/
None
None
Because...
Prior to Python 3.8 Option 1: Custom solution
Prior to Python 3.8
Prior to Python 3.8 Option 2: asynctest library: https://pypi.org/project/asynctest/
Python 3.8
None
Other features: assert_awaited, assert_awaited_once, assert_awaited_with, await_count etc etc.
Other features: Mock iterators
Other features: Mock context managers
Thank You!