Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
b497c76a
Commit
b497c76a
authored
Jun 17, 2006
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up some testing support.
parent
63e57632
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+6
-0
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+2
-11
No files found.
src/zc/buildout/testing.py
View file @
b497c76a
...
...
@@ -53,6 +53,10 @@ def system(command, input=''):
return
o
.
read
()
def
buildoutSetUp
(
test
):
# we both need to make sure that HOME isn't set and be prepared
# to restore whatever it was after the test.
test
.
globs
[
'_oldhome'
]
=
os
.
environ
.
pop
(
'HOME'
,
None
)
sample
=
tempfile
.
mkdtemp
(
'sample-buildout'
)
for
name
in
(
'bin'
,
'eggs'
,
'develop-eggs'
,
'parts'
):
os
.
mkdir
(
os
.
path
.
join
(
sample
,
name
))
...
...
@@ -92,6 +96,8 @@ def buildoutSetUp(test):
def
buildoutTearDown
(
test
):
shutil
.
rmtree
(
test
.
globs
[
'sample_buildout'
])
os
.
chdir
(
test
.
globs
[
'__original_wd__'
])
if
test
.
globs
[
'_oldhome'
]
is
not
None
:
os
.
environ
[
'HOME'
]
=
test
.
globs
[
'_oldhome'
]
script_template
=
'''
\
...
...
src/zc/buildout/tests.py
View file @
b497c76a
...
...
@@ -71,26 +71,17 @@ def linkerTearDown(test):
shutil
.
rmtree
(
test
.
globs
[
'_sample_eggs_container'
])
zc
.
buildout
.
testing
.
buildoutTearDown
(
test
)
def
buildoutSetUp
(
test
):
zc
.
buildout
.
testing
.
buildoutSetUp
(
test
)
test
.
globs
[
'_oldhome'
]
=
os
.
environ
.
get
(
'HOME'
)
def
buildoutTearDoen
(
test
):
if
test
.
globs
[
'_oldhome'
]
is
not
None
:
os
.
environ
[
'HOME'
]
=
test
.
globs
[
'_oldhome'
]
def
buildoutTearDown
(
test
):
shutil
.
rmtree
(
test
.
globs
[
'extensions'
])
shutil
.
rmtree
(
test
.
globs
[
'home'
])
zc
.
buildout
.
testing
.
buildoutTearDown
(
test
)
def
test_suite
():
return
unittest
.
TestSuite
((
#doctest.DocTestSuite(),
doctest
.
DocFileSuite
(
'buildout.txt'
,
setUp
=
zc
.
buildout
.
testing
.
buildoutSetUp
,
tearDown
=
zc
.
buildout
.
testing
.
buildoutTearDown
,
tearDown
=
buildoutTearDown
,
checker
=
renormalizing
.
RENormalizing
([
(
re
.
compile
(
'__buildout_signature__ = recipes-
\
S+
'
),
'
__buildout_signature__
=
recipes
-
SSSSSSSSSSS
'),
...
...
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