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 failure #6

Closed
giopina opened this issue Jan 23, 2018 · 5 comments
Closed

Test failure #6

giopina opened this issue Jan 23, 2018 · 5 comments

Comments

@giopina
Copy link
Contributor

giopina commented Jan 23, 2018

Some tests are failing on my laptop

> ======================================================================
> FAIL: test_dump.test_dump
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/giopina/software/miniconda3/envs/barnaba/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
>     self.test(*self.arg)
>   File "/Users/giopina/software/barnaba/test/test_dump.py", line 36, in test_dump
>     assert(filecmp.cmp("%s/dump_01.test.dat" % outdir,"%s/dump_01.test.dat" % refdir)==True)
> AssertionError
> 
> ======================================================================
> FAIL: test_ermsd.test_ermsd_4
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/giopina/software/miniconda3/envs/barnaba/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
>     self.test(*self.arg)
>   File "/Users/giopina/software/barnaba/test/test_ermsd.py", line 60, in test_ermsd_4
>     assert(filecmp.cmp("%s/ermsd_04.test.dat" % outdir,"%s/ermsd_04.test.dat" % refdir)==True)
> AssertionError
> 
> ----------------------------------------------------------------------
> 
@giopina
Copy link
Contributor Author

giopina commented Jan 23, 2018

It looks like an approximation error

$diff test/tmp/ermsd_04.test.dat test/reference/ermsd_04.test.dat 
1c1
<   8.687377e-06 
---
>   8.672981e-06 
15c15
<   8.251643e-01 
---
>   8.251644e-01 
91c91
<   9.887980e-01 
---
>   9.887979e-01 

tmp_diff-dump_01.txt

@GiovanniBussi
Copy link
Member

Is it possible to just write less digits? Or maybe better write numbers in fixed format.

@giopina
Copy link
Contributor Author

giopina commented Jan 23, 2018

Is it possible to just write less digits? Or maybe better write numbers in fixed format.

The problem is that the first differs in the 3rd digit.
I guess that's because it's a very small number.

@sbottaro
Copy link
Collaborator

I have fixed this in the last commit. Try to update and rerun the tests.

@giopina
Copy link
Contributor Author

giopina commented Jan 23, 2018

Great. Now it's working fine

@giopina giopina closed this as completed Jan 23, 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

No branches or pull requests

3 participants