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
MMCV
Commits
cd873f9c
Unverified
Commit
cd873f9c
authored
Mar 28, 2020
by
Kai Chen
Committed by
GitHub
Mar 28, 2020
Browse files
Fix a potential bug of removing temp dir (#218)
* fix a potential bug of removing temp dir * bump version to v0.4.2
parent
1bc80610
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
mmcv/version.py
mmcv/version.py
+1
-1
tests/test_video.py
tests/test_video.py
+3
-2
No files found.
mmcv/version.py
View file @
cd873f9c
# Copyright (c) Open-MMLab. All rights reserved.
# Copyright (c) Open-MMLab. All rights reserved.
__version__
=
'0.4.
0
'
__version__
=
'0.4.
2
'
tests/test_video.py
View file @
cd873f9c
# Copyright (c) Open-MMLab. All rights reserved.
# Copyright (c) Open-MMLab. All rights reserved.
import
os
import
os
import
os.path
as
osp
import
os.path
as
osp
import
shutil
import
tempfile
import
tempfile
from
collections
import
OrderedDict
from
collections
import
OrderedDict
...
@@ -162,7 +163,7 @@ class TestVideo(object):
...
@@ -162,7 +163,7 @@ class TestVideo(object):
filename
=
'{}/{:03d}.JPEG'
.
format
(
frame_dir
,
i
)
filename
=
'{}/{:03d}.JPEG'
.
format
(
frame_dir
,
i
)
assert
osp
.
isfile
(
filename
)
assert
osp
.
isfile
(
filename
)
os
.
remove
(
filename
)
os
.
remove
(
filename
)
os
.
removedirs
(
frame_dir
)
shutil
.
rmtree
(
frame_dir
)
def
test_frames2video
(
self
):
def
test_frames2video
(
self
):
v
=
mmcv
.
VideoReader
(
self
.
video_path
)
v
=
mmcv
.
VideoReader
(
self
.
video_path
)
...
@@ -193,7 +194,7 @@ class TestVideo(object):
...
@@ -193,7 +194,7 @@ class TestVideo(object):
for
i
in
range
(
self
.
num_frames
):
for
i
in
range
(
self
.
num_frames
):
filename
=
'{}/{:06d}.jpg'
.
format
(
frame_dir
,
i
)
filename
=
'{}/{:06d}.jpg'
.
format
(
frame_dir
,
i
)
os
.
remove
(
filename
)
os
.
remove
(
filename
)
os
.
removedirs
(
frame_dir
)
shutil
.
rmtree
(
frame_dir
)
os
.
remove
(
out_filename
)
os
.
remove
(
out_filename
)
def
test_cut_concat_video
(
self
):
def
test_cut_concat_video
(
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