Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
pytest-concurrent @ PyBay 2017
Search
Reverb C.
August 13, 2017
Programming
380
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
pytest-concurrent @ PyBay 2017
Introduce to pytest-concurrent plugin in lightning talk of PyBay 2017
https://goo.gl/mxthn3
Reverb C.
August 13, 2017
More Decks by Reverb C.
See All by Reverb C.
師大資工系友就業講座
reverbc
0
190
Trend Micro Device App Contest Final Demo
reverbc
0
75
Other Decks in Programming
See All in Programming
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
490
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
Event is what happens
moro
2
810
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
150
Railsバージョンを4倍にした話
optim
0
400
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Balancing Empowerment & Direction
lara
6
1.3k
Chasing Engaging Ingredients in Design
codingconduct
0
360
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
Scaling GitHub
holman
464
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Building AI with AI
inesmontani
PRO
1
1.3k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Technical Leadership for Architectural Decision Making
baasie
3
600
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