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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.buildout
Commits
a4abc524
Commit
a4abc524
authored
Oct 16, 2006
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
At the start of a test, change the working directory to the sample
buildout.
parent
f08b0238
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+5
-3
src/zc/buildout/testing.txt
src/zc/buildout/testing.txt
+3
-1
No files found.
src/zc/buildout/testing.py
View file @
a4abc524
...
@@ -162,14 +162,16 @@ def buildoutSetUp(test):
...
@@ -162,14 +162,16 @@ def buildoutSetUp(test):
sample
=
tmpdir
(
'sample-buildout'
)
sample
=
tmpdir
(
'sample-buildout'
)
os
.
chdir
(
sample
)
# Create a basic buildout.cfg to avoid a warning from buildout:
# Create a basic buildout.cfg to avoid a warning from buildout:
open
(
os
.
path
.
join
(
sample
,
'buildout.cfg'
)
,
'w'
).
write
(
open
(
'buildout.cfg'
,
'w'
).
write
(
"[buildout]
\
n
parts =
\
n
"
"[buildout]
\
n
parts =
\
n
"
)
)
# Use the buildout bootstrap command to create a buildout
# Use the buildout bootstrap command to create a buildout
zc
.
buildout
.
buildout
.
Buildout
(
zc
.
buildout
.
buildout
.
Buildout
(
os
.
path
.
join
(
sample
,
'buildout.cfg'
)
,
'buildout.cfg'
,
[(
'buildout'
,
'log-level'
,
'WARNING'
),
[(
'buildout'
,
'log-level'
,
'WARNING'
),
# trick bootstrap into putting the buildout develop egg
# trick bootstrap into putting the buildout develop egg
# in the eggs dir.
# in the eggs dir.
...
@@ -179,7 +181,7 @@ def buildoutSetUp(test):
...
@@ -179,7 +181,7 @@ def buildoutSetUp(test):
# Create the develop-eggs dir, which didn't get created the usual
# Create the develop-eggs dir, which didn't get created the usual
# way due to thr trick above:
# way due to thr trick above:
os
.
mkdir
(
os
.
path
.
join
(
sample
,
'develop-eggs'
)
)
os
.
mkdir
(
'develop-eggs'
)
def
start_server
(
path
):
def
start_server
(
path
):
port
,
thread
=
_start_server
(
path
,
name
=
path
)
port
,
thread
=
_start_server
(
path
,
name
=
path
)
...
...
src/zc/buildout/testing.txt
View file @
a4abc524
...
@@ -10,7 +10,9 @@ zc.buildout.testing.buildoutSetUp(test)
...
@@ -10,7 +10,9 @@ zc.buildout.testing.buildoutSetUp(test)
---------------------------------------
---------------------------------------
The buildoutSetup function can be used as a doctest setup function.
The buildoutSetup function can be used as a doctest setup function.
It performs adds a number of names to the test namespace:
It creates a sample buildout that can be used by tests, changing the
current working directory to the sample_buildout. It also adds a
number of names to the test namespace:
``sample_buildout``
``sample_buildout``
This is the name of a buildout with a basic configuration.
This is the name of a buildout with a basic configuration.
...
...
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