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
pytest-concurrent @ PyBay 2017
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Reverb C.
August 13, 2017
Programming
1
360
pytest-concurrent @ PyBay 2017
Introduce to pytest-concurrent plugin in lightning talk of PyBay 2017
https://goo.gl/mxthn3
Reverb C.
August 13, 2017
Tweet
Share
More Decks by Reverb C.
See All by Reverb C.
師大資工系友就業講座
reverbc
0
190
Trend Micro Device App Contest Final Demo
reverbc
0
66
Other Decks in Programming
See All in Programming
CSC307 Lecture 08
javiergs
PRO
0
670
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
AI & Enginnering
codelynx
0
110
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
270
CSC307 Lecture 06
javiergs
PRO
0
690
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
120
Basic Architectures
denyspoltorak
0
670
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.1k
How STYLIGHT went responsive
nonsquared
100
6k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
180
Skip the Path - Find Your Career Trail
mkilby
0
56
Crafting Experiences
bethany
1
49
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
GraphQLとの向き合い方2022年版
quramy
50
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
ラッコキーワード サービス紹介資料
rakko
1
2.3M
Transcript
Concurrent Testing with py.test Reverb Chu, Sr. SWE @ Trend
Micro James Wang, UGrad CS Student @ Uni. of Washington
https://goo.gl/mxthn3
https://goo.gl/mxthn3 https://www.apple.com/macbook/
https://goo.gl/mxthn3
Current Solutions 1. pytest-xdist 2. ...there’s no 2. https://goo.gl/mxthn3
Why Not pytest-xdist? - Designed for test distribution - Only
support multiprocessing - Not able to do test grouping https://goo.gl/mxthn3
pytest-concurrent life is too short for sequential tests https://goo.gl/mxthn3
Different Concurrent Mode mthread - Impl. with threading - For
IO intensive tests mproc - Impl. with multiprocessing - For CPU intensive tests asyncnet - Impl. with gevent - For network IO intensive tests https://goo.gl/mxthn3
Configurable Worker Amount $ pytest --concmode=mthread --concworkers=10 https://goo.gl/mxthn3
Configurable Worker Amount $ pytest --concmode=mthread --concworkers=max https://goo.gl/mxthn3
Testing in Groups import pytest import time @pytest.mark.concgroup(1) @pytest.mark.parametrize('para', [1,
2, 3, 4, 5]) def test_something(para): time.sleep(2) assert para % 2 @pytest.mark.concgroup(1) def test_something_else(): time.sleep(1) assert 1 == 2 @pytest.mark.concgroup(2) @pytest.mark.parametrize('name', ['this', 'is', 'a', 'book']) def test_second_group(name): time.sleep(2) def test_something_last(): time.sleep(2) raise MemoryError @pytest.mark.concgroup(group: int) https://goo.gl/mxthn3
May ?? I want it... Aug 11 v0.1.2 Jul 31
Let’s Do This Jun 20 Intern Onboard Aug 10 v0.1.1 Aug 9 v0.1.0 https://goo.gl/mxthn3
$ pip install pytest-concurrent https://goo.gl/mxthn3 @reverbc @jamesw96