Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
e1b0d341
Commit
e1b0d341
authored
Sep 18, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5360 from SpecLad:test2-fail-on-failed-download
parents
fb4b4cbf
08ad3b50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
test2.py
modules/python/test/test2.py
+5
-12
No files found.
modules/python/test/test2.py
View file @
e1b0d341
...
...
@@ -2,17 +2,8 @@
import
unittest
import
random
import
time
import
math
import
sys
import
array
import
urllib
import
tarfile
import
urllib2
import
hashlib
import
os
import
getopt
import
operator
import
functools
import
numpy
as
np
import
cv2
import
cv2.cv
as
cv
...
...
@@ -21,8 +12,10 @@ class NewOpenCVTests(unittest.TestCase):
def
get_sample
(
self
,
filename
,
iscolor
=
cv
.
CV_LOAD_IMAGE_COLOR
):
if
not
filename
in
self
.
image_cache
:
filedata
=
urllib
.
urlopen
(
"https://raw.github.com/Itseez/opencv/2.4/"
+
filename
)
.
read
()
self
.
image_cache
[
filename
]
=
cv2
.
imdecode
(
np
.
fromstring
(
filedata
,
dtype
=
np
.
uint8
),
iscolor
)
filedata
=
urllib2
.
urlopen
(
"https://raw.github.com/Itseez/opencv/2.4/"
+
filename
)
.
read
()
image
=
cv2
.
imdecode
(
np
.
fromstring
(
filedata
,
dtype
=
np
.
uint8
),
iscolor
)
self
.
assertFalse
(
image
is
None
)
self
.
image_cache
[
filename
]
=
image
return
self
.
image_cache
[
filename
]
def
setUp
(
self
):
...
...
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