Skip to content
Snippets Groups Projects
Commit 2f2aa40b authored by Florent Jaillet's avatar Florent Jaillet
Browse files

Relaxing some tests to avoid failing in MacOS

parent fbb3cb61
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,7 @@ from __future__ import print_function, division ...@@ -63,7 +63,7 @@ from __future__ import print_function, division
import unittest import unittest
import numpy as np import numpy as np
from numpy.testing import assert_array_equal, assert_allclose from numpy.testing import assert_allclose
from ltfatpy.gabor.phaselock import phaselock from ltfatpy.gabor.phaselock import phaselock
from ltfatpy.gabor.phaseunlock import phaseunlock from ltfatpy.gabor.phaseunlock import phaseunlock
...@@ -107,7 +107,7 @@ class TestPhaselock(unittest.TestCase): ...@@ -107,7 +107,7 @@ class TestPhaselock(unittest.TestCase):
out = phaselock(**inputs) out = phaselock(**inputs)
msg = ('Wrong output in phaselock with inputs ' + msg = ('Wrong output in phaselock with inputs ' +
str(inputs)) str(inputs))
assert_array_equal(out, outputs[0], msg) assert_allclose(out, outputs[0], rtol=1e-15, err_msg=msg)
def test_inverse(self): def test_inverse(self):
"""Check that phaselock and phaseunlock are inverse functions """Check that phaselock and phaseunlock are inverse functions
......
...@@ -63,7 +63,7 @@ from __future__ import print_function, division ...@@ -63,7 +63,7 @@ from __future__ import print_function, division
import unittest import unittest
import numpy as np import numpy as np
from numpy.testing import assert_array_equal from numpy.testing import assert_allclose
from ltfatpy.gabor.phaseunlock import phaseunlock from ltfatpy.gabor.phaseunlock import phaseunlock
from ltfatpy.gabor.dgt import dgt from ltfatpy.gabor.dgt import dgt
...@@ -106,7 +106,7 @@ class TestPhaseunlock(unittest.TestCase): ...@@ -106,7 +106,7 @@ class TestPhaseunlock(unittest.TestCase):
out = phaseunlock(**inputs) out = phaseunlock(**inputs)
msg = ('Wrong output in phaseunlock with inputs ' + msg = ('Wrong output in phaseunlock with inputs ' +
str(inputs)) str(inputs))
assert_array_equal(out, outputs[0], msg) assert_allclose(out, outputs[0], rtol=1e-15, err_msg=msg)
if __name__ == '__main__': if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment