Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
6a543019
Unverified
Commit
6a543019
authored
May 20, 2021
by
Nicolas Hug
Committed by
GitHub
May 20, 2021
Browse files
fbcode-friendly tests for nvjpeg decoding (#3860)
parent
59c67318
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
test/test_image.py
test/test_image.py
+8
-1
No files found.
test/test_image.py
View file @
6a543019
...
@@ -280,8 +280,15 @@ class ImageTester(unittest.TestCase):
...
@@ -280,8 +280,15 @@ class ImageTester(unittest.TestCase):
@
needs_cuda
@
needs_cuda
@
pytest
.
mark
.
parametrize
(
'img_path'
,
[
# We need to change the "id" for that parameter.
# If we don't, the test id (i.e. its name) will contain the whole path to the image which is machine-specific,
# and this creates issues when the test is running in a different machine than where it was collected
# (typically, in fb internal infra)
pytest
.
param
(
jpeg_path
,
id
=
jpeg_path
.
split
(
'/'
)[
-
1
])
for
jpeg_path
in
get_images
(
IMAGE_ROOT
,
".jpg"
)
])
@
pytest
.
mark
.
parametrize
(
'mode'
,
[
ImageReadMode
.
UNCHANGED
,
ImageReadMode
.
GRAY
,
ImageReadMode
.
RGB
])
@
pytest
.
mark
.
parametrize
(
'mode'
,
[
ImageReadMode
.
UNCHANGED
,
ImageReadMode
.
GRAY
,
ImageReadMode
.
RGB
])
@
pytest
.
mark
.
parametrize
(
'img_path'
,
get_images
(
IMAGE_ROOT
,
".jpg"
))
@
pytest
.
mark
.
parametrize
(
'scripted'
,
(
False
,
True
))
@
pytest
.
mark
.
parametrize
(
'scripted'
,
(
False
,
True
))
def
test_decode_jpeg_cuda
(
mode
,
img_path
,
scripted
):
def
test_decode_jpeg_cuda
(
mode
,
img_path
,
scripted
):
if
'cmyk'
in
img_path
:
if
'cmyk'
in
img_path
:
...
...
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