pytest_lesson
Examples used for a lesson in pytest
Lesson 1
Basic unit tests for a function that calculates if a year is a leap year.
Lesson 1
Part 1
Mocking the random function to make tests for a dice roller app.
Part 2
Mocking pymysql to test code that interacts with a mysql database.
Lesson 3
Build-up and tear down using fixtures. Note - requires connecting to a mysql database with pymysql.
Requirements
python 3.5