Skip to content

fwph/pytest-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py.test: the missing examples

py.test is a great framework. the documentation is pretty okay once you know what you're looking for, but when you're just getting started out or unlock its more powerful features, it can be rough going.

these examples are meant to

  • help me remember and always have some boilerplate around for different types of tests
  • help you learn, refresh, or copy-paste basic pytest code for your own use.

so feel free to yoink anything you like from here. if you find some of these test examples atrocious, and have some good arguments around best practices, start a discussion! if you want to contribute a better example or some additional examples around pytest plugins, make a pull request!

we're all better off when more of us know how to write tests.

why py.test?

py.test is quite straightforward to use, actively developed, and has an extensive library of plugins. it can even make writing tests fun!

wait wait wait: how do i install it?

right:

$ pip install pytest

or, since you're using this tutorial:

$ pip install -r requirements.txt

About

py.test: the missing examples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages