Testing with PyTest


  1. Pytest setup
  2. Pytest simple module to be tested
  3. Pytest simple tests - success
  4. Pytest simple tests - success output
  5. Pytest simple tests - failure
  6. Pytest simple tests - failure output
  7. Selective running of test functions
  8. Pytest: expect a test to fail (xfail or TODO tests)
  9. PyTest: show xfailed tests
  10. Pytest: skipping tests
  11. Pytest: skipping tests output
  12. Pytest verbose mode
  13. Pytest quiet mode
  14. PyTest: print STDOUT and STDERR
  15. PyTest Failure reports
  16. PyTest Compare numbers
  17. PyTest Compare numbers relatively
  18. PyTest Compare strings
  19. PyTest Compare long strings
  20. PyTest in strings
  21. PyTest test any expression
  22. PyTest element in list
  23. PyTest compare lists
  24. PyTest compare dictionaries
  25. PyTest compare dictionaries output
  26. PyTest expected exceptions
  27. PyTest expected exceptions output
  28. PyTest expected exceptions (text changed)
  29. PyTest expected exceptions (text changed) output
  30. PyTest expected exceptions (other exception)
  31. PyTest expected exceptions (other exception) output
  32. PyTest expected exceptions (no exception)
  33. PyTest expected exceptions (no exception) output
  34. PyTest expected exceptions (bank deposit)
  35. PyTest expected exceptions (bank deposit) no exception
  36. PyTest: Multiple Failures
  37. PyTest: Multiple Failures output
  38. PyTest: stop on first failure
  39. Fixture - setup and teardown
  40. Fixture - setup and teardown output
  41. Fixture - tmpdir
  42. PyTest: Run tests in parallel with xdist
  43. Pytest: One dimensional spacefight
  44. Pytest: Mocking input and output
  45. Pytest: Mocking random
  46. PyTest: Class
  47. PyTest: Class output
  48. Pytest: Flask echo
  49. Pytest: testing Flask echo
  50. PyTest - test discovery