pydata/pandas — pull request #3956 by jtratner (2013-06-19 03:46:35+00:00)
Title: Change bare exceptions 1

Relates to #3954. In addition to changing exceptions types returned to be more explicit, this pull incorporates the following changes:

1. Adds a new `assertRaisesRegexp` to `util/testing.py` to port the `assertRaisesRegexp` helper from 2.7+ unittest
2. Cleans up stats/common.
3. Fix up initial assertions in `tseries.offset._cached_range` that were all off + fix the test cases which were all just raising TypeErrors because they were calling with the wrong arguments.
4. Changes the example timezone from Asia/Beijing to Asia/Hong+Kong b/c `Asia/Beijing` is not supported by pytz.
5. Any tz-aware : tz-naive comparison fails with TypeError, as will mismatched, localize, etc. calls.
6. Changes `SparseArray` indexing error messages to match tuple message for completeness.