Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.face
Commits
dd636293
Commit
dd636293
authored
Jun 18, 2015
by
Manuel Günther
Browse files
Included tolerances into tests
parent
23cd2627
Changes
2
Hide whitespace changes
Inline
Side-by-side
bob/bio/face/test/test_extractors.py
View file @
dd636293
...
...
@@ -33,14 +33,14 @@ import pkg_resources
regenerate_refs
=
False
def
_compare
(
data
,
reference
,
write_function
=
bob
.
bio
.
base
.
save
,
read_function
=
bob
.
bio
.
base
.
load
):
def
_compare
(
data
,
reference
,
write_function
=
bob
.
bio
.
base
.
save
,
read_function
=
bob
.
bio
.
base
.
load
,
atol
=
1e-5
,
rtol
=
1e-8
):
# write reference?
if
regenerate_refs
:
write_function
(
data
,
reference
)
# compare reference
reference
=
read_function
(
reference
)
assert
numpy
.
allclose
(
data
,
reference
,
atol
=
1e-5
)
assert
numpy
.
allclose
(
data
,
reference
,
atol
=
atol
,
rtol
=
rtol
)
def
_data
():
return
bob
.
bio
.
base
.
load
(
pkg_resources
.
resource_filename
(
'bob.bio.face.test'
,
'data/cropped.hdf5'
))
...
...
bob/bio/face/test/test_preprocessors.py
View file @
dd636293
...
...
@@ -33,14 +33,14 @@ import bob.bio.face
import
bob.db.verification.utils
def
_compare
(
data
,
reference
,
write_function
=
bob
.
bio
.
base
.
save
,
read_function
=
bob
.
bio
.
base
.
load
):
def
_compare
(
data
,
reference
,
write_function
=
bob
.
bio
.
base
.
save
,
read_function
=
bob
.
bio
.
base
.
load
,
atol
=
1e-5
,
rtol
=
1e-8
):
# write reference?
if
regenerate_refs
:
write_function
(
data
,
reference
)
# compare reference
reference
=
read_function
(
reference
)
assert
numpy
.
allclose
(
data
,
reference
,
atol
=
1e-5
)
assert
numpy
.
allclose
(
data
,
reference
,
atol
=
atol
,
rtol
=
rtol
)
def
_image
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment