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
50910971
Commit
50910971
authored
Aug 28, 2009
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks to get tests to pass accross Python 2.4, 2.5, and 2.6.
parent
fc897d37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+5
-1
zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
+12
-5
No files found.
src/zc/buildout/tests.py
View file @
50910971
...
@@ -2893,7 +2893,11 @@ def test_suite():
...
@@ -2893,7 +2893,11 @@ def test_suite():
(re.compile('
extdemo
[.]
pyd
'), '
extdemo
.
so
'),
(re.compile('
extdemo
[.]
pyd
'), '
extdemo
.
so
'),
(re.compile('
[
-
d
]
setuptools
-
\
S
+
[.]
egg
'), '
setuptools
.
egg
'),
(re.compile('
[
-
d
]
setuptools
-
\
S
+
[.]
egg
'), '
setuptools
.
egg
'),
(re.compile(r'
\\
[
\\
]
?
'), '
/
'),
(re.compile(r'
\\
[
\\
]
?
'), '
/
'),
]),
]+(sys.version_info < (2, 5) and [
(re.compile('
.
*
No
module
named
runpy
.
*
', re.S), ''),
(re.compile('
.
*
usage
:
pdb
.
py
scriptfile
.
*
', re.S), ''),
(re.compile('
.
*
Error
:
what
does
not
exist
.
*
', re.S), ''),
] or [])),
),
),
doctest.DocFileSuite(
doctest.DocFileSuite(
...
...
zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
View file @
50910971
...
@@ -107,6 +107,7 @@ And the generated scripts invoke Python 2.4:
...
@@ -107,6 +107,7 @@ And the generated scripts invoke Python 2.4:
>>> shebang == '#!' + other_executable
>>> shebang == '#!' + other_executable
True
True
>>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
>>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
<BLANKLINE>
import sys
import sys
<BLANKLINE>
<BLANKLINE>
sys.path[0:0] = [
sys.path[0:0] = [
...
@@ -116,21 +117,27 @@ And the generated scripts invoke Python 2.4:
...
@@ -116,21 +117,27 @@ And the generated scripts invoke Python 2.4:
<BLANKLINE>
<BLANKLINE>
_interactive = True
_interactive = True
if len(sys.argv) > 1:
if len(sys.argv) > 1:
import getopt
_options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
_options, _args = getopt.getopt(sys.argv[1:], 'ic:')
_interactive = False
_interactive = False
for (_opt, _val) in _options:
for (_opt, _val) in _options:
if _opt == '-i':
if _opt == '-i':
_interactive = True
_interactive = True
elif _opt == '-c':
elif _opt == '-c':
exec _val
exec _val
elif _opt == '-m':
sys.argv[1:] = _args
_args = []
__import__("runpy").run_module(
_val, {}, "__main__", alter_sys=True)
<BLANKLINE>
<BLANKLINE>
if _args:
if _args:
sys.argv[:] = _args
sys.argv[:] = _args
execfile(sys.argv[0])
__file__ = _args[0]
del _options, _args
execfile(__file__)
<BLANKLINE>
<BLANKLINE>
if _interactive:
if _interactive:
import cod
e
del _interactiv
e
code
.interact(banner="", local=globals())
__import__("code")
.interact(banner="", local=globals())
>>> f.close()
>>> f.close()
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