[Numpy-discussion] pytest and degrees of separation.
Charles R Harris
charlesr.harris at gmail.com
Wed Jul 12 07:53:21 EDT 2017
On Wed, Jul 12, 2017 at 1:26 AM, Ralf Gommers <ralf.gommers at gmail.com>
> On Wed, Jul 12, 2017 at 11:06 AM, Chris Barker <chris.barker at noaa.gov>
>> On Tue, Jul 11, 2017 at 5:04 PM, Thomas Caswell <tcaswell at gmail.com>
>>> Going with option 2 is probably the best option so that you can use
>>> pytest fixtures and parameterization.
>> I agree -- those are worth a lot!
> Maybe I'm dense, but I don't quite see the difference between 1 and 2.
> Test files should never be imported unless tests are run, they're not part
> of any public API nor do they currently have __init__.py files.
In practice, that would generally be true, but the nose testing tools were
1, all nose imports were buried in functions that ran during testing.
Whether or not that was by intent I don't know. But having an explicit
consensus on 2, which seems to be the case here, is helpful because it
allows better use of pytest fixtures.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion