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
b9e9c28f
"vscode:/vscode.git/clone" did not exist on "544c203d87cdc8c0584f5886eb72efe6018da81a"
Unverified
Commit
b9e9c28f
authored
Aug 18, 2022
by
vfdev
Committed by
GitHub
Aug 18, 2022
Browse files
Added missing assert (#6446)
parent
97bb6cb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test/test_prototype_transforms.py
test/test_prototype_transforms.py
+6
-6
No files found.
test/test_prototype_transforms.py
View file @
b9e9c28f
...
...
@@ -793,7 +793,7 @@ class TestRandomColorOp:
if
p
>
0.0
:
fn
.
assert_called_once_with
(
inpt
,
**
kwargs
)
else
:
fn
.
call_count
==
0
assert
fn
.
call_count
==
0
class
TestRandomPerspective
:
...
...
@@ -1014,7 +1014,7 @@ class TestRandomErasing:
if
p
>
0.0
:
fn
.
assert_called_once_with
(
erase_image_tensor_inpt
,
**
params
)
else
:
fn
.
call_count
==
0
assert
fn
.
call_count
==
0
class
TestTransform
:
...
...
@@ -1050,7 +1050,7 @@ class TestToImageTensor:
transform
=
transforms
.
ToImageTensor
()
transform
(
inpt
)
if
inpt_type
in
(
features
.
BoundingBox
,
str
,
int
):
fn
.
call_count
==
0
assert
fn
.
call_count
==
0
else
:
fn
.
assert_called_once_with
(
inpt
,
copy
=
transform
.
copy
)
...
...
@@ -1067,7 +1067,7 @@ class TestToImagePIL:
transform
=
transforms
.
ToImagePIL
()
transform
(
inpt
)
if
inpt_type
in
(
features
.
BoundingBox
,
str
,
int
):
fn
.
call_count
==
0
assert
fn
.
call_count
==
0
else
:
fn
.
assert_called_once_with
(
inpt
,
copy
=
transform
.
copy
)
...
...
@@ -1085,7 +1085,7 @@ class TestToPILImage:
transform
=
transforms
.
ToPILImage
()
transform
(
inpt
)
if
inpt_type
in
(
PIL
.
Image
.
Image
,
features
.
BoundingBox
,
str
,
int
):
fn
.
call_count
==
0
assert
fn
.
call_count
==
0
else
:
fn
.
assert_called_once_with
(
inpt
,
mode
=
transform
.
mode
)
...
...
@@ -1103,7 +1103,7 @@ class TestToTensor:
transform
=
transforms
.
ToTensor
()
transform
(
inpt
)
if
inpt_type
in
(
features
.
Image
,
torch
.
Tensor
,
features
.
BoundingBox
,
str
,
int
):
fn
.
call_count
==
0
assert
fn
.
call_count
==
0
else
:
fn
.
assert_called_once_with
(
inpt
)
...
...
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