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
1909495a
Unverified
Commit
1909495a
authored
Sep 24, 2019
by
Francisco Massa
Committed by
GitHub
Sep 24, 2019
Browse files
Fix Windows CI after #1301 (#1368)
parent
d7dce103
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
test/test_utils.py
test/test_utils.py
+2
-0
No files found.
test/test_utils.py
View file @
1909495a
...
...
@@ -55,6 +55,7 @@ class Tester(unittest.TestCase):
utils
.
save_image
(
t
,
f
.
name
)
assert
os
.
path
.
exists
(
f
.
name
),
'The pixel image is not present after save'
@
unittest
.
skipIf
(
'win'
in
sys
.
platform
,
'temporarily disabled on Windows'
)
def
test_save_image_file_object
(
self
):
with
tempfile
.
NamedTemporaryFile
(
suffix
=
'.png'
)
as
f
:
t
=
torch
.
rand
(
2
,
3
,
64
,
64
)
...
...
@@ -65,6 +66,7 @@ class Tester(unittest.TestCase):
img_bytes
=
Image
.
open
(
fp
)
assert
torch
.
equal
(
F
.
to_tensor
(
img_orig
),
F
.
to_tensor
(
img_bytes
)),
'Image not stored in file object'
@
unittest
.
skipIf
(
'win'
in
sys
.
platform
,
'temporarily disabled on Windows'
)
def
test_save_image_single_pixel_file_object
(
self
):
with
tempfile
.
NamedTemporaryFile
(
suffix
=
'.png'
)
as
f
:
t
=
torch
.
rand
(
1
,
3
,
1
,
1
)
...
...
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