Add some python tests of the type pattern matching
Fix for python 2