Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Kirill Smelkov
gevent
Commits
f1d68aa0
Commit
f1d68aa0
authored
Nov 09, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests that use relative imports.
parent
e0a7c267
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
src/gevent/testing/testrunner.py
src/gevent/testing/testrunner.py
+5
-6
src/gevent/tests/test__environ.py
src/gevent/tests/test__environ.py
+1
-1
src/gevent/tests/test__monkey_scope.py
src/gevent/tests/test__monkey_scope.py
+7
-0
No files found.
src/gevent/testing/testrunner.py
View file @
f1d68aa0
...
...
@@ -415,12 +415,7 @@ def _setup_environ(debug=False):
# Python 3.6
os
.
environ
[
'PYTHONMALLOC'
]
=
'debug'
if
(
sys
.
version_info
==
(
3
,
7
,
0
,
'beta'
,
2
)
and
(
os
.
environ
.
get
(
"PYTHONDEVMODE"
)
or
os
.
environ
.
get
(
'PYTHONMALLOC'
))):
# See https://twitter.com/ossmkitty/status/970693025130311680
# https://bugs.python.org/issue33005
os
.
environ
.
pop
(
'PYTHONDEVMODE'
,
None
)
os
.
environ
.
pop
(
'PYTHONMALLOC'
,
None
)
def
main
():
import
argparse
...
...
@@ -485,6 +480,10 @@ def main():
# XXX: Add a way to force these.
print
(
"Not running tests on pypy with c-ares; not a supported configuration"
)
return
if
options
.
package
:
# Put this directory on the path so relative imports work.
package_dir
=
_dir_from_package_name
(
options
.
package
)
os
.
environ
[
'PYTHONPATH'
]
=
os
.
environ
.
get
(
'PYTHONPATH'
,
""
)
+
os
.
pathsep
+
package_dir
run_many
(
tests
,
configured_failing_tests
=
FAILING_TESTS
,
failfast
=
options
.
failfast
,
quiet
=
options
.
quiet
)
...
...
src/gevent/tests/test__environ.py
View file @
f1d68aa0
...
...
@@ -6,7 +6,7 @@ import subprocess
if
sys
.
argv
[
1
:]
==
[]:
os
.
environ
[
'GEVENT_BACKEND'
]
=
'select'
popen
=
subprocess
.
Popen
([
sys
.
executable
,
'test__environ.py'
,
'1'
])
popen
=
subprocess
.
Popen
([
sys
.
executable
,
__file__
,
'1'
])
assert
popen
.
wait
()
==
0
,
popen
.
poll
()
else
:
hub
=
gevent
.
get_hub
()
...
...
src/gevent/tests/test__monkey_scope.py
View file @
f1d68aa0
...
...
@@ -10,6 +10,13 @@ from subprocess import PIPE
class
TestRun
(
unittest
.
TestCase
):
maxDiff
=
None
def
setUp
(
self
):
self
.
cwd
=
os
.
getcwd
()
os
.
chdir
(
os
.
path
.
dirname
(
__file__
))
def
tearDown
(
self
):
os
.
chdir
(
self
.
cwd
)
def
_run
(
self
,
script
):
env
=
os
.
environ
.
copy
()
env
[
'PYTHONWARNINGS'
]
=
'ignore'
...
...
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