Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
8df29e7c
Commit
8df29e7c
authored
Mar 13, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up some exception blocks in TestModuleUtilsBasic
parent
a0cb9745
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test/units/TestModuleUtilsBasic.py
+6
-6
No files found.
test/units/TestModuleUtilsBasic.py
View file @
8df29e7c
...
...
@@ -110,9 +110,9 @@ class TestModuleUtilsBasic(unittest.TestCase):
md5sum
=
utils_md5
(
tmp_path
)
self
.
assertEqual
(
md5sum
,
'5ceaa7ed396ccb8e959c02753cb4bd18'
)
except
:
self
.
cleanup_temp_file
(
tmp_fd
,
tmp_path
)
raise
self
.
cleanup_temp_file
(
tmp_fd
,
tmp_path
)
finally
:
self
.
cleanup_temp_file
(
tmp_fd
,
tmp_path
)
# test run_command with a double shell redirect out (append) (with both use_unsafe_shell=True|False)
def
test_run_command_string_unsafe_with_double_redirect_out
(
self
):
...
...
@@ -124,9 +124,9 @@ class TestModuleUtilsBasic(unittest.TestCase):
md5sum
=
utils_md5
(
tmp_path
)
self
.
assertEqual
(
md5sum
,
'5ceaa7ed396ccb8e959c02753cb4bd18'
)
except
:
self
.
cleanup_temp_file
(
tmp_fd
,
tmp_path
)
raise
self
.
cleanup_temp_file
(
tmp_fd
,
tmp_path
)
finally
:
self
.
cleanup_temp_file
(
tmp_fd
,
tmp_path
)
# test run_command with data
def
test_run_command_string_with_data
(
self
):
...
...
@@ -149,8 +149,8 @@ class TestModuleUtilsBasic(unittest.TestCase):
self
.
assertTrue
(
os
.
path
.
exists
(
tmp_path
))
self
.
assertEqual
(
out
.
strip
(),
tmp_path
)
except
:
self
.
cleanup_temp_dir
(
tmp_path
)
raise
self
.
cleanup_temp_dir
(
tmp_path
)
finally
:
self
.
cleanup_temp_dir
(
tmp_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