-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
281 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
nose2/tests/functional/support/scenario/many_tests_socket/nose2.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[multiprocess] | ||
bind_address = 127.1.2.3 |
8 changes: 8 additions & 0 deletions
8
nose2/tests/functional/support/scenario/many_tests_socket/test_gen_many_socket_func.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
def check(_): | ||
pass | ||
|
||
|
||
def test(): | ||
for i in range(0, 600): | ||
yield check, i | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[tox] | ||
envlist=py26,py27,py32,py33,pypy,docs,self27,cov27 | ||
|
||
# Default settings for py27, py32, py33 and pypy | ||
[testenv] | ||
deps=-r{toxinidir}/requirements.txt | ||
commands=python -m unittest discover [] | ||
|
||
[testenv:jython] | ||
deps=-r{toxinidir}/requirements.txt | ||
-r{toxinidir}/requirements-py26.txt | ||
commands=unit2 discover [] | ||
|
||
[testenv:docs] | ||
basepython=python2.7 | ||
changedir=docs | ||
deps=-r{toxinidir}/requirements.txt | ||
-r{toxinidir}/requirements-docs.txt | ||
commands=sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html | ||
|
||
[testenv:py26] | ||
deps=-r{toxinidir}/requirements.txt | ||
-r{toxinidir}/requirements-py26.txt | ||
commands=python unit_workaround.py discover [] | ||
|
||
[testenv:py27] | ||
deps=-r{toxinidir}/requirements.txt | ||
commands=python unit_workaround.py discover [] | ||
|
||
[testenv:self27] | ||
basepython=python2.7 | ||
deps=-r{toxinidir}/requirements.txt | ||
setenv=PYTHONPATH={toxinidir} | ||
commands=python unit_workaround.py discover [] | ||
|
||
[testenv:cov27] | ||
basepython=python2.7 | ||
deps=coverage>=3.3 | ||
-r{toxinidir}/requirements.txt | ||
commands=coverage erase | ||
coverage run unit_workaround.py discover [] | ||
coverage report --include=*nose2* --omit=*nose2/tests* | ||
coverage html -d cover --include=*nose2* --omit=*nose2/tests* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
Python 2.7 Multiprocessing Unittest workaround. | ||
===================================================================== | ||
Due the manner in which multiprocessing is handled on windows | ||
and the fact that __main__.py are actually called __main__ | ||
This workaround bypasses the fact that the calling unittest | ||
script is called __main__ | ||
http://bugs.python.org/issue10845 | ||
This should be fine for python 3.2+, however, 2.7 and before will | ||
not likely see a fix. This only affects the unittests called by tox. | ||
Also with python 2.6 , the windows balks on unit2 (the sh script) not | ||
being a valid executable. | ||
""" | ||
try: | ||
import unittest2 | ||
from unittest2.main import main, TestProgram, USAGE_AS_MAIN | ||
except ImportError: | ||
import unittest | ||
from unittest.main import main, TestProgram, USAGE_AS_MAIN | ||
|
||
TestProgram.USAGE = USAGE_AS_MAIN | ||
|
||
if __name__ == "__main__": | ||
main(module=None) | ||
|