Check for BUILD_TESTS for python

The reason for this is that python/test fails outside Statoil. This is also consistent with the other libraries.