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
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
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
CSC307 Lecture 09
javiergs
PRO
1
840
AI時代の認知負荷との向き合い方
optfit
0
160
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
580
CSC307 Lecture 01
javiergs
PRO
0
690
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
200
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
100
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
290
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Odyssey Design
rkendrick25
PRO
1
500
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Code Reviewing Like a Champion
maltzj
527
40k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
A Soul's Torment
seathinner
5
2.3k
Skip the Path - Find Your Career Trail
mkilby
0
56
Git: the NoSQL Database
bkeepers
PRO
432
66k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
310
Abbi's Birthday
coloredviolet
1
4.7k
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