To make the test faster, let's not make train a class variable. Just load it once as local variable to be sure it loads. Then use self.test in the other methods.