Skip to content

Latest commit

 

History

History
75 lines (54 loc) · 2.87 KB

File metadata and controls

75 lines (54 loc) · 2.87 KB

Test

ApprovalTests.Python.StarterProject

Starter project for getting approvaltests up and running

Contents

Who is this project for?

Anyone that wants to do some new code in Python with Approvaltests.
It works great for experimentation, katas or starting a green field project.

Getting Started

If you are familar with python, you can either:

  • download the zip (under the code button

or

  • Fork the code by pressing use this template

Watch the video

If you are having any difficulties, We suggest you watch the getting started video
tip: pause the video after each step and do it so you are in sync

What is included?

  • Github actions - CI that runs your tests on Mac, Windows & Linux
    This is also what powers the green 'passing' badge at the top of this document
  • requirements.txt - standard place to include all your pip dependiences from pypi
  • `tox.ini' - A working tox file
  • tests & project folders - to keep your production code and tests seperate
  • Sample tests that pass - to get you off to a great start
  • MDSnippets intergration to easily add code snippets to your markdown documentation

Recommended Tooling?

ApprovalTests Basics

Approvaltests uses methods that start with verify like verify(object_under_test) The expected result is stored in a file like such:

{
    "age": 38,
    "firstName": "jayne",
    "isMale": true,
    "lastName": "cobb"
}

snippet source | anchor

Next steps

If you are just exploring you might want to try a sample exercise(kata). I would suggest you start with LCD digits kata