Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Pytest & happy friends

http://www.meetup.com/Tainan-py-Python-Tainan-User-Group/events/200676602/
by

Chun-Yu Tseng

on 27 August 2014

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Pytest & happy friends

"Happy friends" are important this time !
What will you do in airplane ?
Long time ago ...
Opening
Editor: Joe
2014.08.23 @ isrlab
Tainan.py x MOSUT
Opening
JUnit
PyUnit
Pytest
Pytest & happy friends
X
@
Outline
XUnit Story: http://www.martinfowler.com/bliki/Xunit.html
Kent Beck
Erich Gamma
Already changed the testing world ...
JUnit
Evolution:
3.x
4.x
From: http://www.asjava.com/junit/junit-3-vs-junit-4-comparison/
10 Differences Between JUnit 3.x and JUnit 4.x
and
why you should move to JUnit 4.x platform.
From: http://goo.gl/K6WCQS
diff
Current
Visit wiki: https://github.com/junit-team/junit/wiki
is a Python version of JUnit
PyUnit
Fix: ... Python version of
old
JUnit
unittest (2.7.8)
Basic example:
doc: https://docs.python.org/2.7/library/unittest.html
unittest (3.4.1)
Basic example:
doc: https://docs.python.org/3.4/library/unittest.html
diff: http://goo.gl/q7GHrZ
Based on the old concept ...
Python's builtin unittest module is:
stable
mature
widely used
Note: unittest2 is for old python (2.4~2.7)
Better testing framework ?
"Python" is not "Java":
dynamic typing
The zen of python
is a mature full-featured testing tool
Pytest
included in pylib (since 2004)
stand-alone in 2010
nose is "inspired" by py.test
used by:
PyPy, sentry, tox, six ...
Brief history
provides easy no-boilerplate testing
scales from simple unit to complex functional testing
integrates with other testing methods and tools
extensive plugin and customization system
Features
Let's learn pytest from masters
"learn ... from masters series" ... since 2014 @ isrlab
Official website: http://pytest.org/latest/index.html
Introduction to pytest
slides: https://speakerdeck.com/pelme/introduction-to-pytest
video: http://goo.gl/H3M7dU
Advanced Uses of py.test Fixtures
slides: http://devork.be/talks/advanced-fixtures/advfix.html
video: http://goo.gl/rSRFpL
video: http://goo.gl/0wbppP
Improving automated testing with py.test
Holger Krekel: http://holgerkrekel.net/
Founder
/

developer

of

PyPy

pytest tox
...
Twitter: @hpk42
Try it now !
Any Question ?
more pytest:
pytest: rapid simple testing (by Holger Krekel)
Full transcript