minor stuff: The second argument of assert should be an error message. If a test fails with "non-empty training data", I would assume the assertion is that the training data is empty.