In the go programing language there is a testing pattern called table tests. I want to quickly go over what is this pattern, why I think it’s great and how we can use it in python. What are Table tests In go a simple test would look like this: func TestAdd(t *testing.T) { got := add(5, 6) if got != 11 { t.Errorf("Expected 11, Got %v", got) } } A table test of the same kind will look like this:
Read MoreTesting Pyspark
We all know unit testing our code is a good idea. But there is some kind of inertia that keeps most of us from doing it. Part of this inertia, I believe is not knowing how to start. So I am sharing how I write tests for pyspark in the hopes that it will give you the push you need. Testing in python First things first, if you’ve never written a test for a normal python function we need to get that out of the way first.
Read More