Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fail in some architectures #316

Closed
sergiopasra opened this issue May 31, 2017 · 3 comments · Fixed by #317
Closed

Test fail in some architectures #316

sergiopasra opened this issue May 31, 2017 · 3 comments · Fixed by #317
Milestone

Comments

@sergiopasra
Copy link

I'm building a package of pywt for Fedora and running the tests in different architectures.

https://koji.fedoraproject.org/koji/taskinfo?taskID=19794657

One test fails in the following architectures: ppc64le, aarch64, ppc64 and s390x
And passes in x86_64, i686 and armv7hl

For example, this is the build.log in ppc64le
https://kojipkgs.fedoraproject.org//work/tasks/4659/19794659/build.log

The offending test is the following. It's the same failure in Python 2.7

======================================================================
FAIL: test_swt.test_swt_decomposition
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-0.5.2-2.fc27.ppc64le/usr/lib64/python3.6/site-packages/pywt/tests/test_swt.py", line 46, in test_swt_decomposition
    assert_allclose(cD3, expected_cD3)
  File "/usr/lib64/python3.6/site-packages/numpy/testing/utils.py", line 1395, in assert_allclose
    verbose=verbose, header=header, equal_nan=equal_nan)
  File "/usr/lib64/python3.6/site-packages/numpy/testing/utils.py", line 778, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0
(mismatch 25.0%)
 x: array([ -8.152529e-16,  -3.535534e+00,  -4.242641e+00,  -2.121320e+00,
         7.009625e-16,   3.535534e+00,   4.242641e+00,   2.121320e+00])
 y: array([ 0.      , -3.535534, -4.242641, -2.12132 ,  0.      ,  3.535534,
        4.242641,  2.12132 ])
----------------------------------------------------------------------
@grlee77
Copy link
Contributor

grlee77 commented Jun 1, 2017

Thanks for reporting this. It looks like the tests just need to allow for a small absolute deviation from the expected result. (i.e. -8.152e-16 is not quite 0). Can you see if the fix proposed in #317 resolves the issue on these architectures?

@sergiopasra
Copy link
Author

With this patch, the tests pass in all architectures. Thank you!

@sergiopasra
Copy link
Author

@grlee77 grlee77 added this to the v1.0 milestone Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants