Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Gwenaël Samain
cython
Commits
92dcb8df
Commit
92dcb8df
authored
May 03, 2018
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify environment handling in srctree tests.
parent
eb0e4666
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
runtests.py
runtests.py
+15
-19
No files found.
runtests.py
View file @
92dcb8df
...
@@ -1525,13 +1525,14 @@ class EndToEndTest(unittest.TestCase):
...
@@ -1525,13 +1525,14 @@ class EndToEndTest(unittest.TestCase):
.replace("CYTHON", "PYTHON %s" % os.path.join(self.cython_root, 'cython.py'))
.replace("CYTHON", "PYTHON %s" % os.path.join(self.cython_root, 'cython.py'))
.replace("PYTHON", sys.executable))
.replace("PYTHON", sys.executable))
old_path = os.environ.get('PYTHONPATH')
old_path = os.environ.get('PYTHONPATH')
os.environ['PYTHONPATH'] = self.cython_syspath + os.pathsep + (old_path or ''
)
env = dict(os.environ
)
try:
env['PYTHONPATH'] = self.cython_syspath + os.pathsep + (old_path or '')
for command in filter(None, commands.splitlines()):
for command in filter(None, commands.splitlines()):
p = subprocess.Popen(command,
p = subprocess.Popen(command,
stderr=subprocess.PIPE,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
stdout=subprocess.PIPE,
shell=True)
shell=True,
env=env)
out, err = p.communicate()
out, err = p.communicate()
res = p.returncode
res = p.returncode
if res != 0:
if res != 0:
...
@@ -1539,11 +1540,6 @@ class EndToEndTest(unittest.TestCase):
...
@@ -1539,11 +1540,6 @@ class EndToEndTest(unittest.TestCase):
print(self._try_decode(out))
print(self._try_decode(out))
print(self._try_decode(err))
print(self._try_decode(err))
self.assertEqual(0, res, "non-zero exit status")
self.assertEqual(0, res, "non-zero exit status")
finally:
if old_path:
os.environ['PYTHONPATH'] = old_path
else:
del os.environ['PYTHONPATH']
self.success = True
self.success = True
...
...
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