apel/apel — pull request #4 by tofu-rocketry (2014-01-27 16:26:26+00:00)
Title: Improve slurm parser input checking.

- Change asserts to if...raise ValueError.
- Add examples to unit test to check for negative durations and StopTime
less than StartTime.

Using asserts for checking input from external sources is a bad idea as they are not specific in their exception type and they can be skipped if Python is run with optimisations. (A good explanation here: https://mail.python.org/pipermail/python-list/2013-November/660401.html)