Closed FlorianWilhelm closed 7 years ago
Ohh my bad :-/ I there is already one. sorry
@grantjenks Still the test_regression unit test error seems to be unrelated and never worked locally. This is due to the fact that random.seed(0) is set only once at the beginning. That means that adding new unit tests will change the current state of the random variables in each function. This led to the failure of test_regression. The problem with code duplication in test_runstats and test_runstats_core persists....
I agree the duplicated code in test_runstats and test_runstats_core is ugly. I did it that way just because it's quick. Opened #8.
I also changed the fitted line in test_regression
because it was simply too easy to exceed the error limit.
Currently one unit test namely
test_regression()
is not working, at least on my machine. A continuous integration system like Travis would allow you to automatically check all unit tests after every push to the repo. That being said I noticed that the test filestest_runstats.py
andtest_runstats_core.py
differ only by a few lines in order to test the cythonized code and the pure python code. I guess there must be a way to avoid this kind of code duplication maybe with some smart usage of py.test fixtures but I am not 100% sure.