Monday, July 4, 2011

Backend Testing

The following is a code snippet of our testing system for Python Nose tests:

class TestSobel(BackendTester):
def test_00_00_zeros(self):
"""Sobel on an array of all zeros"""
result = F.sobel(np.zeros((10, 10), dtype=np.float32))
assert (np.all(result == 0))


When we inherit from BackendTester, tests are generated for all the implemented backends. If you have a missing dependency, the test will be skipped.

No comments:

Post a Comment