@easyaspython
Adopt-a-pytest
PyOhio 2019
Dane Hillard
Lead Web Application Developer
!2
Slide 3
Slide 3 text
@easyaspython
About me
Reasons to pytest
How to pytest
More reasons to pytest
!3
Slide 4
Slide 4 text
@easyaspython
What’s a Dane?
!4
Slide 5
Slide 5 text
@easyaspython
! Developing in Python (and Django) for ~7 years
! Web app development for ~4 years
! I do hobbies
○ Lifestyle photographer
○ Musician
○ Epicurean
○ Competitive ballroom dancer
○ Blogger
○ Author
!5
Slide 6
Slide 6 text
@easyaspython
Practices of the Python Pro
! bit.ly/the-python-pro
! Gentle intro to software design practices
!6
Slide 7
Slide 7 text
@easyaspython
!7
Slide 8
Slide 8 text
@easyaspython
!8
Slide 9
Slide 9 text
@easyaspython
!9
! 50+ apps
! 900+ modules
! 300+ test modules
! 2K+ tests
Before: Manual,
occasional, often broken
Now: Automated*, every
commit, not broken
Slide 10
Slide 10 text
@easyaspython
What’s a pytest?
!10
Slide 11
Slide 11 text
@easyaspython
Simpler syntax
!11
Slide 12
Slide 12 text
@easyaspython
!12
Slide 13
Slide 13 text
@easyaspython
!13
Slide 14
Slide 14 text
@easyaspython
!14
Slide 15
Slide 15 text
@easyaspython
!15
Slide 16
Slide 16 text
@easyaspython
Fixtures
!16
Slide 17
Slide 17 text
@easyaspython
!17
Slide 18
Slide 18 text
@easyaspython
!18
Slide 19
Slide 19 text
@easyaspython
!19
Slide 20
Slide 20 text
@easyaspython
!20
Slide 21
Slide 21 text
@easyaspython
Marks, patterns, filtering
!21
Slide 22
Slide 22 text
@easyaspython
!22
Slide 23
Slide 23 text
@easyaspython
!23
Slide 24
Slide 24 text
@easyaspython
!24
Slide 25
Slide 25 text
@easyaspython
!25
Slide 26
Slide 26 text
@easyaspython
Durations
!26
Slide 27
Slide 27 text
@easyaspython
!27
Slide 28
Slide 28 text
@easyaspython
Parallels for most
unittest stuff
!28