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
XRD
darfix
Commits
0d3be1a7
Commit
0d3be1a7
authored
Mar 02, 2020
by
Julia Garriga Ferrer
Browse files
[core][tests] Skip sift tests unless pyopencl is installed
parent
4b813c82
Pipeline
#22344
passed with stage
in 2 minutes and 25 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
darfix/core/test/test_components_matching.py
View file @
0d3be1a7
...
...
@@ -33,6 +33,8 @@ import unittest
import
numpy
from
silx.opencl.common
import
ocl
from
darfix.core.componentsMatching
import
ComponentsMatching
,
Method
from
skimage
import
data
...
...
@@ -63,6 +65,7 @@ class TestComponentsMatching(unittest.TestCase):
self
.
assertNotEqual
(
ed
,
0
)
@
unittest
.
skipUnless
(
ocl
,
"PyOpenCl is missing"
)
def
test_sift_match
(
self
):
final_matches
,
matches
=
self
.
componentsMatching
.
match_components
(
method
=
Method
.
sift_feature_matching
)
self
.
assertEqual
(
final_matches
[
0
],
1
)
...
...
@@ -83,6 +86,7 @@ class TestComponentsMatching(unittest.TestCase):
stack
=
self
.
componentsMatching
.
draw_matches
(
final_matches
,
matches
)
self
.
assertEqual
(
stack
[
2
].
shape
,
(
512
,
1024
))
@
unittest
.
skipUnless
(
ocl
,
"PyOpenCl is missing"
)
def
test_draw_matches2
(
self
):
final_matches
,
matches
=
self
.
componentsMatching
.
match_components
(
method
=
Method
.
sift_feature_matching
)
stack
=
self
.
componentsMatching
.
draw_matches
(
final_matches
,
matches
)
...
...
Write
Preview
Supports
Markdown
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