Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 875 Bytes

File metadata and controls

45 lines (31 loc) · 875 Bytes
title timestamp author published description tags todo
Testing Python code with pytest
2024-06-19 05:30:01 -0700
szabgab
true
pytest
TODO

{% youtube id="I43eplQafcg" %}

Notes

  • Slides

  • A little background about functional testing.

  • How to test the Meetup web site?

  • Very complex.

  • The difficulty to introduce testing late in the process.

  • Start simple, test a function.

    • mymath - add two numbers
    • how to use it from another file
    • the same way we test it
  • Copy paste it to multiply two numbers Show failure

  • Fixing the code or marking the test as "expected to fail"?

  • -rx

  • Warn about running code but not verifying it with assert

  • Fibonacci - exception

  • Verbose -v

  • print STDOUT -s

  • Stop on first failure -x --maxfail 42