Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Chris Barker
On Wed, Aug 8, 2018 at 9:38 AM, Evgeni Burovski wrote: > Stdlib unittest supports self.assertRaises context manager from python 3.1 > but that requires using unittest :-) On Wed, Aug 8, 2018, 7:30 PM Eric Wieser > wrote: > >> You forget that we already have that feature in our testing layer,

Re: [Numpy-discussion] Proposal to accept NEP-18, __array_function__ protocol

2018-08-08 Thread Stephan Hoyer
OK, I am can give you a few more days. I'll be camping through the weekend, but hope to accept it when I get back on Monday! On Wed, Aug 8, 2018 at 1:07 AM Nathaniel Smith wrote: > I'm sorry, I've been trying to find the time to read what you ended up > with, and haven't managed yet – could I

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Matti Picus
On 08/08/18 17:34, Juan Nunez-Iglesias wrote: A NumPy document on preferred testing practices would be very valuable even to projects beyond NumPy, just like HOW_TO_DOCUMENT.txt was valuable to the entire ecosystem. We have these guidelines

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Juan Nunez-Iglesias
> I find the way that pytest automatically match *argument names* with > the names of fixtures very distasteful and un-Pythonic. THIS! I've been wanting to articulate this for a while but couldn't quite put my finger on it. Nevertheless, I agree with the sentiment in this thread, specifically

Re: [Numpy-discussion] Adoption of a Code of Conduct

2018-08-08 Thread Matthew Harrigan
> > One concern I have is the phrase "explicitly honour" in "we explicitly honour diversity in: age, culture, ...". Honour is a curious word choice. honour is defined as, among other things, "to worship", "high public esteem; fame; glory",

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Stephan Hoyer
On Wed, Aug 8, 2018 at 9:25 AM Tyler Reddy wrote: > +1 for pytest parametrization and some of the more straight forward > context managers like pytest.raises and so on > +1 from me, too. > +0.5 for the fancy fixture stuff in pytest (have to concede that this > stuff can be really hard to

Re: [Numpy-discussion] Proposal to accept NEP-18, __array_function__ protocol

2018-08-08 Thread Nathaniel Smith
I'm sorry, I've been trying to find the time to read what you ended up with, and haven't managed yet – could I get a few days extension? :-) -n On Wed, Aug 1, 2018 at 5:27 PM, Stephan Hoyer wrote: > I propose to accept NEP-18, "A dispatch mechanism for NumPy’s high level > array functions": >

Re: [Numpy-discussion] Taking back control of the #numpy irc channel

2018-08-08 Thread Sebastian Berg
On Tue, 2018-08-07 at 22:07 -0700, Ralf Gommers wrote: > > > On Tue, Aug 7, 2018 at 4:34 AM, Sebastian Berg s.net> wrote: > > On Mon, 2018-08-06 at 21:52 -0700, Ralf Gommers wrote: > > > > > > > > > On Mon, Aug 6, 2018 at 7:15 PM, Nathan Goldbaum > l.co > > > m> wrote: > > > > Hi, > > > > >

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Hameer Abbasi
> On 8. Aug 2018, at 17:23, Charles R Harris wrote: > > Hi All, > > I'm writing some tests and would like to come to a common understanding as to > whether we are should use pytest fixtures and parametrized classes and > functions. The immediate problem is testing over all types that should

Re: [Numpy-discussion] Taking back control of the #numpy irc channel

2018-08-08 Thread Ralf Gommers
On Wed, Aug 8, 2018 at 1:23 AM, Sebastian Berg wrote: > On Tue, 2018-08-07 at 22:07 -0700, Ralf Gommers wrote: > > > > > > On Tue, Aug 7, 2018 at 4:34 AM, Sebastian Berg > s.net> wrote: > > > On Mon, 2018-08-06 at 21:52 -0700, Ralf Gommers wrote: > > > > > > > > > > > > On Mon, Aug 6, 2018 at

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Ralf Gommers
On Wed, Aug 8, 2018 at 8:27 AM, Hameer Abbasi wrote: > > On 8. Aug 2018, at 17:23, Charles R Harris > wrote: > > > > Hi All, > > > > I'm writing some tests and would like to come to a common understanding > as to whether we are should use pytest fixtures and parametrized classes > and

[Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Charles R Harris
Hi All, I'm writing some tests and would like to come to a common understanding as to whether we are should use pytest fixtures and parametrized classes and functions. The immediate problem is testing over all types that should be supported, which something we should to much more of and is most

Re: [Numpy-discussion] Taking back control of the #numpy irc channel

2018-08-08 Thread Sebastian Berg
On Wed, 2018-08-08 at 08:55 -0700, Ralf Gommers wrote: > > > On Wed, Aug 8, 2018 at 1:23 AM, Sebastian Berg s.net> wrote: > > On Tue, 2018-08-07 at 22:07 -0700, Ralf Gommers wrote: > > > > > > > > > On Tue, Aug 7, 2018 at 4:34 AM, Sebastian Berg > tion > > > s.net> wrote: > > > > On Mon,

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Chris Barker - NOAA Federal
> as to whether we are should use pytest fixtures and parametrized classes and > functions. Absolutely! > the disadvantage is being dependent on pytest as unittest does not support that functionality. Which is the whole point of using pytest, yes? I’m very opinionated about this, but I

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Tyler Reddy
+1 for pytest parametrization and some of the more straight forward context managers like pytest.raises and so on +0.5 for the fancy fixture stuff in pytest (have to concede that this stuff can be really hard to reason about sometimes, especially with custom scoping decorators, but if it helps to

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Eric Wieser
Is another nice feature You forget that we already have that feature in our testing layer, with np.testing.assert_raises(AnException): pass ​ On Wed, 8 Aug 2018 at 09:08 Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > BTW: > > with pytest.raises(AnException): > > >

Re: [Numpy-discussion] pytest, fixture and parametrize

2018-08-08 Thread Evgeni Burovski
This is actually available from both nose (old-style np.testing framework), and pytest. Stdlib unittest supports self.assertRaises context manager from python 3.1 On Wed, Aug 8, 2018, 7:30 PM Eric Wieser wrote: > Is another nice feature > > You forget that we already have that feature in our