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: expect a test to fail (xfail or TODO tests)
  10. PyTest: show xfailed tests
  11. Pytest: skipping tests
  12. Pytest: show skipped tests
  13. Pytest: show extra test summmary info
  14. Pytest: skipping tests output in verbose mode
  15. Pytest verbose mode
  16. Pytest quiet mode
  17. PyTest: print STDOUT and STDERR
  18. PyTest Failure reports
  19. PyTest Compare numbers
  20. PyTest Compare numbers relatively
  21. PyTest Compare strings
  22. PyTest Compare long strings
  23. PyTest in strings
  24. PyTest test any expression
  25. PyTest element in list
  26. PyTest compare lists
  27. PyTest compare short lists
  28. PyTest compare short lists - verbose output
  29. PyTest compare dictionaries
  30. PyTest compare dictionaries output
  31. PyTest expected exceptions
  32. PyTest expected exceptions output
  33. PyTest expected exceptions (text changed)
  34. PyTest expected exceptions (text changed) output
  35. PyTest expected exceptions (other exception)
  36. PyTest expected exceptions (other exception) output
  37. PyTest expected exceptions (no exception)
  38. PyTest expected exceptions (no exception) output
  39. PyTest expected exceptions (bank deposit)
  40. PyTest expected exceptions (bank deposit) no exception
  41. PyTest: Multiple Failures
  42. PyTest: Multiple Failures output
  43. PyTest: stop on first failure
  44. Fixture - setup and teardown
  45. Fixture - setup and teardown output
  46. Fixture - tmpdir
  47. Fixture - home made fixtures
  48. PyTest: Run tests in parallel with xdist
  49. Pytest: One dimensional spacefight
  50. Pytest: Mocking input and output
  51. Pytest: Mocking random
  52. PyTest: Class
  53. PyTest: Class output
  54. Pytest features
  55. Pytest: Flask echo
  56. Pytest: testing Flask echo
  57. PyTest: Order of tests
  58. PyTest: Randomize Order of tests
  59. PyTest: Force default order
  60. PyTest: no random order
  61. Module to test with selftest
  62. PyTest - assertion
  63. PyTest - failure
  64. PyTest - list
  65. PyTest discovery
  66. PyTest - test discovery
  67. PyTest select tests by name
  68. PyTest select tests by marker
  69. Pytest resources