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
fb14bc89
Commit
fb14bc89
authored
May 13, 2012
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added cd and uncd test conveniences.
parent
a09ec64d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+10
-1
src/zc/buildout/testing.txt
src/zc/buildout/testing.txt
+5
-0
No files found.
src/zc/buildout/testing.py
View file @
fb14bc89
...
...
@@ -227,6 +227,15 @@ def buildoutSetUp(test):
register_teardown
(
lambda
:
stop_server
(
url
,
thread
))
return
url
cdpaths
=
[]
def
cd
(
*
path
):
path
=
os
.
path
.
join
(
*
path
)
cdpaths
.
append
(
os
.
path
.
abspath
(
os
.
getcwd
()))
os
.
chdir
(
path
)
def
uncd
():
os
.
chdir
(
cdpaths
.
pop
())
test
.
globs
.
update
(
dict
(
sample_buildout
=
sample
,
ls
=
ls
,
...
...
@@ -238,7 +247,7 @@ def buildoutSetUp(test):
write
=
write
,
system
=
system
,
get
=
get
,
cd
=
(
lambda
*
path
:
os
.
chdir
(
os
.
path
.
join
(
*
path
)))
,
cd
=
cd
,
uncd
=
uncd
,
join
=
os
.
path
.
join
,
sdist
=
sdist
,
bdist_egg
=
bdist_egg
,
...
...
src/zc/buildout/testing.txt
View file @
fb14bc89
...
...
@@ -79,6 +79,11 @@ number of names to the test namespace:
The directory will be reset at the end of the test.
``uncd()``
Change to the directory that was current prior to the previous
call to ``cd``. You can call ``cd`` multiple times and then
``uncd`` the same number of times to return to the same location.
``join(*path)``
A convenient reference to os.path.join.
...
...
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