Posts

Showing posts from February, 2019

Exploring Hypothesis with pytest - Part 1

Image
I found Hypothesis library very intriguing so have started exploring it.  Here are my notes from the first hypothesis exploratory session What is Hypothesis? From their webpage - Hypothesis is a Python library for creating unit tests which are simpler to write and more powerful when run, finding edge cases in your code you wouldn’t have thought to look for. It is stable, powerful and easy to add to any existing test suite. You can read more about it and its claims here -> https://hypothesis.readthedocs.io/en/latest/index.html I am definitely not a fan of tall claims like - "finding edge cases in your code you wouldn’t have thought to look for"! Anyways I will come to that later on. For now I wanted to explore its ability to add to any existing test suite. So I picked pytest What is pytest? Again from their webpage - The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. More her