Tests with machine learning in python