Nice! I didn't know that version also worked as a context manager.
On Mar 20, 2014 3:14 PM, "Jai Ram Rideout" <notifications@github.com> wrote:

> In skbio/draw/tests/test_distributions.py:
>
> > @@ -74,20 +73,20 @@ def tearDown(self):
> >      def test_validate_input_null(self):
> >          """_validate_input() should raise a ValueError if null data is passed
> >          to it."""
> > -        self.assertRaises(ValueError, _validate_input,
> > -                          self.Null, None, None, None)
> > +        with npt.assert_raises(ValueError):
>
> Ah okay- note that the following will both work:
>
> with self.assertRaises(ValueError):
>     ...
> with npt.assert_raises(ValueError):
>     ...
>
> Definitely agree that using a context manager for these sorts of tests is
> the way to go.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biocore/scikit-bio/pull/202/files#r10796095>
> .
>