Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b4d74732 authored by hhakim's avatar hhakim
Browse files

Add unit tests for pyfaust.Faust.__pos__/__neg__.

parent db7aca6e
Branches
Tags
No related merge requests found
......@@ -461,3 +461,13 @@ class TestFaust(unittest.TestCase):
draw_faust()
self.assertTrue(exists(file1))
self.assertTrue(exists(file2))
def test_neg(self):
print("Test pyfaust.Faust.__neg__")
nF = - self.F
self.assertTrue(np.allclose(nF.toarray(), - self.F.toarray()))
def test_pos(self):
print("Test pyfaust.Faust.__pos__")
pF = + self.F
self.assertTrue(np.allclose(pF.toarray(), + self.F.toarray()))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment