enthought / distarray

Default Repo description from terraform module
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Fuzz testing #95

Open kwmsmith opened 10 years ago

kwmsmith commented 10 years ago

For robustness, it would be good to have a separate test module that:

We could test the edge cases in a separate test class as well -- size of zero in one or more dimensions, all dimensions undistributed, using a view with just one target /engine, etc.

cowlicks commented 10 years ago

We would have to have a way of reusing the random data. So we would need test suite return whatever the initialization vector was.

markkness commented 10 years ago

Would it be enough to save/return only the seed used to initialize the random number generator?

On Mon, Feb 3, 2014 at 12:26 PM, Blake Griffith notifications@github.comwrote:

We would have to have a way of reusing the random data. So we would need test suite return whatever the initialization vector was.

Reply to this email directly or view it on GitHubhttps://github.com/enthought/distarray/issues/95#issuecomment-33983892 .

cowlicks commented 10 years ago

@markkness Yes. That is what I meant random seed is a better word than initialization vector.

rkern commented 10 years ago

It should take a RandomState instance and use its methods to generate the random data. Don't use the convenience functions in numpy.random that use (and thus modify) the global state.

bgrant commented 10 years ago

John T. mentioned using the Python port of QuickCheck for this:

https://pypi.python.org/pypi/pytest-quickcheck/0.8

@kwmsmith : Is this still a possible task for @markkness ?

kwmsmith commented 10 years ago

I've never used py.test -- what's the consensus on it? Can we keep our current unittest-based test suite and have py.test run it with the fuzz testing turned on as an extra?

bgrant commented 10 years ago

@kwmsmith : It seems to be pretty widespread, though I haven't used it either. TravisCI installs it by default. pytest will run unittest testcases:

http://pytest.org/latest/goodpractises.html#python-test-discovery

kwmsmith commented 10 years ago

Putting on wishlist for now -- can move to milestone 0.3 if and when we get there.

bgrant commented 9 years ago

Possibly consider: https://github.com/DRMacIver/hypothesis