Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
slapos.recipe.cmmi
Commits
10beede5
Commit
10beede5
authored
11 years ago
by
Thomas Larrieu
Browse files
Options
Download
Email Patches
Plain Diff
Finished working on tests. Everything should be working fine.
parent
72ad08b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
slapos/recipe/cmmi/tests.py
slapos/recipe/cmmi/tests.py
+19
-4
No files found.
slapos/recipe/cmmi/tests.py
View file @
10beede5
...
@@ -332,14 +332,29 @@ class NonInformativeTests(unittest.TestCase):
...
@@ -332,14 +332,29 @@ class NonInformativeTests(unittest.TestCase):
'test'
,
'test'
,
{
{
'url'
:
'file://%s/testdata/package-0.0.0.tar.gz'
%
os
.
path
.
dirname
(
__file__
),
'url'
:
'file://%s/testdata/package-0.0.0.tar.gz'
%
os
.
path
.
dirname
(
__file__
),
'cleanup'
:
'foo
\n
bar
'
'cleanup'
:
'foo'
}
}
)
)
os
.
chdir
(
self
.
dir
)
os
.
chdir
(
self
.
dir
)
self
.
assertFalse
(
os
.
path
.
exists
(
'foo'
))
self
.
assertFalse
(
os
.
path
.
exists
(
'foo'
))
self
.
assertFalse
(
os
.
path
.
exists
(
'bar'
))
with
self
.
assertRaises
(
IOError
):
with
self
.
assertRaises
(
IOError
,
recipe
.
install
())
as
cm
:
recipe
.
install
()
print
cm
.
error_code
def
test_cleanup_fails_when_file_is_out_of_reach
(
self
):
recipe
=
self
.
make_recipe
(
{},
'test'
,
{
'url'
:
'file://%s/testdata/package-0.0.0.tar.gz'
%
os
.
path
.
dirname
(
__file__
),
'cleanup'
:
'/tmp/foo'
}
)
os
.
chdir
(
self
.
dir
)
open
(
'/tmp/foo'
,
'a'
)
self
.
assertTrue
(
os
.
path
.
exists
(
'/tmp/foo'
))
with
self
.
assertRaises
(
IOError
):
recipe
.
install
()
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
((
suite
=
unittest
.
TestSuite
((
...
...
This diff is collapsed.
Click to expand it.
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