Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.cmmi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.recipe.cmmi
Commits
f4a5588d
Commit
f4a5588d
authored
Feb 19, 2010
by
Nicolas Dumazet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a test to check behavior when __compile__ directory already exists
parent
870f92ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
hexagonit/recipe/cmmi/tests.py
hexagonit/recipe/cmmi/tests.py
+21
-1
No files found.
hexagonit/recipe/cmmi/tests.py
View file @
f4a5588d
from
zope.testing
import
doctest
from
zope.testing
import
doctest
from
zope.testing
import
renormalizing
from
zope.testing
import
renormalizing
import
errno
import
os
import
os
import
re
import
re
import
shutil
import
shutil
...
@@ -37,10 +38,15 @@ class NonInformativeTests(unittest.TestCase):
...
@@ -37,10 +38,15 @@ class NonInformativeTests(unittest.TestCase):
def
make_recipe
(
self
,
buildout
,
name
,
options
):
def
make_recipe
(
self
,
buildout
,
name
,
options
):
from
hexagonit.recipe.cmmi
import
Recipe
from
hexagonit.recipe.cmmi
import
Recipe
parts_directory_path
=
os
.
path
.
join
(
self
.
dir
,
'test_parts'
)
parts_directory_path
=
os
.
path
.
join
(
self
.
dir
,
'test_parts'
)
try
:
os
.
mkdir
(
parts_directory_path
)
os
.
mkdir
(
parts_directory_path
)
except
OSError
,
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
bo
=
{
bo
=
{
'buildout'
:
{
'buildout'
:
{
'parts-directory'
:
parts_directory_path
,
'parts-directory'
:
parts_directory_path
,
'directory'
:
self
.
dir
,
}
}
}
}
bo
.
update
(
buildout
)
bo
.
update
(
buildout
)
...
@@ -82,6 +88,20 @@ class NonInformativeTests(unittest.TestCase):
...
@@ -82,6 +88,20 @@ class NonInformativeTests(unittest.TestCase):
os
.
chdir
(
self
.
dir
)
os
.
chdir
(
self
.
dir
)
self
.
assertEquals
(
self
.
dir
,
os
.
getcwd
())
self
.
assertEquals
(
self
.
dir
,
os
.
getcwd
())
def
test_compile_directory_exists
(
self
):
"""
Do not fail if the compile-directory already exists
"""
compile_directory
=
os
.
path
.
join
(
self
.
dir
,
'test_parts/test__compile__'
)
os
.
makedirs
(
compile_directory
)
recipe
=
self
.
make_recipe
({},
'test'
,
dict
(
url
=
"some invalid url"
))
os
.
chdir
(
self
.
dir
)
# if compile directory exists, recipe should raise an IOError because
# of the bad URL, and _not_ some OSError because test__compile__
# already exists
self
.
assertRaises
(
IOError
,
recipe
.
install
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
((
suite
=
unittest
.
TestSuite
((
...
...
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