etsy/skyline — pull request #11 by oxtopus (2013-06-15 07:01:11+00:00)
Title: Simple algorithms unit test case

Useful for making sure pandas, numpy, and scipy are installed correctly. Must be run from a directory such that `settings` is in the path.

For example:

cd src
python analyzer/algorithms_test.py

Works with [nose](https://github.com/nose-devs/nose) (optional):

cd src
nosetests -v --nocapture analyzer

Results, with coverage:

```
$ nosetests -v --nocapture --with-coverage --cover-package=algorithms analyzer
test_first_hour_average (algorithms_test.TestAlgorithms) ... ok
test_grubbs (algorithms_test.TestAlgorithms) ... ok
test_histogram_bins (algorithms_test.TestAlgorithms) ... ok
test_least_squares (algorithms_test.TestAlgorithms) ... ok
test_mean_subtraction_cumulation (algorithms_test.TestAlgorithms) ... ok
test_run_selected_algorithm (algorithms_test.TestAlgorithms) ... ok
test_simple_stddev_from_moving_average (algorithms_test.TestAlgorithms) ... ok
test_stddev_from_moving_average (algorithms_test.TestAlgorithms) ... ok
test_tail_avg (algorithms_test.TestAlgorithms) ... ok

Name Stmts Miss Cover Missing
------------------------------------------
algorithms 101 14 86% 32-33, 126, 151-152, 157, 166, 170, 175, 180, 188-191
----------------------------------------------------------------------
Ran 9 tests in 4.348s

OK
```