From 0214ce1d0062d5659a14900496b6af804b4681ed Mon Sep 17 00:00:00 2001
From: Ryan Williams
Date: Sun, 4 Oct 2009 12:01:15 -0700
Subject: [PATCH 1/5] Removed doctest test, explained how to replace its
functionality with nose's in the docs.
---
doc/testing.rst | 10 ++++++++++
tests/test__doctests.py | 32 --------------------------------
2 files changed, 10 insertions(+), 32 deletions(-)
delete mode 100644 tests/test__doctests.py
diff --git a/doc/testing.rst b/doc/testing.rst
index 3ed0f36..40127c1 100644
--- a/doc/testing.rst
+++ b/doc/testing.rst
@@ -23,6 +23,16 @@ That's it! The output from running nose is the same as unittest's output, if th
Many tests are skipped based on environmental factors; for example, it makes no sense to test Twisted-specific functionality when Twisted is not installed. These are printed as S's during execution, and in the summary printed after the tests run it will tell you how many were skipped.
+Doctests
+--------
+
+To run the doctests included in many of the eventlet modules, use this command:
+
+.. code-block :: sh
+
+ $ nosetests --with-doctest eventlet/*.py
+
+Currently there are 14 doctests.
Standard Library Tests
----------------------
diff --git a/tests/test__doctests.py b/tests/test__doctests.py
deleted file mode 100644
index da1102c..0000000
--- a/tests/test__doctests.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import os
-import re
-import doctest
-import unittest
-import eventlet
-
-base = os.path.dirname(eventlet.__file__)
-modules = set()
-
-for path, dirs, files in os.walk(base):
- package = 'eventlet' + path.replace(base, '').replace('/', '.')
- modules.add((package, os.path.join(path, '__init__.py')))
- for f in files:
- module = None
- if f.endswith('.py'):
- module = f[:-3]
- if module:
- modules.add((package + '.' + module, os.path.join(path, f)))
-
-suite = unittest.TestSuite()
-tests_count = 0
-modules_count = 0
-for m, path in modules:
- if re.search('^\s*>>> ', open(path).read(), re.M):
- s = doctest.DocTestSuite(m)
- print '%s (from %s): %s tests' % (m, path, len(s._tests))
- suite.addTest(s)
- modules_count += 1
- tests_count += len(s._tests)
-print 'Total: %s tests in %s modules' % (tests_count, modules_count)
-runner = unittest.TextTestRunner(verbosity=2)
-runner.run(suite)
From 0008b8582a88a808456b1f3505ce8e9563bc776f Mon Sep 17 00:00:00 2001
From: Ryan Williams
Date: Mon, 5 Oct 2009 17:45:27 -0700
Subject: [PATCH 2/5] 0.9.0 branding
---
NEWS | 1 +
eventlet/__init__.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index cf2c4c7..ec71eba 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
* Removed test dependency on sqlite, using nose instead.
* Marked known-broken tests using nose's mechanism (most of these are not broken but are simply run in the incorrect context, such as threading-related tests that are incompatible with the libevent hub).
* Remove copied code from python standard libs (in tests).
+* Added eventlet.patcher which can be used to import "greened" modules.
0.8.16
======
diff --git a/eventlet/__init__.py b/eventlet/__init__.py
index be3a322..ea5e5d0 100644
--- a/eventlet/__init__.py
+++ b/eventlet/__init__.py
@@ -17,5 +17,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-version_info = (0, 9, '0pre')
+version_info = (0, 9, '0')
__version__ = '%s.%s.%s' % version_info
From e5fc3874c72c98a4b5e973694c5c3de9b081fbd5 Mon Sep 17 00:00:00 2001
From: Ryan Williams
Date: Tue, 6 Oct 2009 21:40:32 -0700
Subject: [PATCH 3/5] Updated the version info in the documentation. Gotta
figure out a way to make that download url less manual.
---
doc/conf.py | 5 +++--
doc/real_index.html | 2 +-
eventlet/__init__.py | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/doc/conf.py b/doc/conf.py
index 44a8f79..46d06d0 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -48,10 +48,11 @@ copyright = u'2009, '
# |version| and |release|, also used in various other places throughout the
# built documents.
#
+import eventlet
# The short X.Y version.
-version = '0.9'
+version = '%s.%s' % (eventlet.version_info[0], eventlet.version_info[1])
# The full version, including alpha/beta/rc tags.
-release = '0.9pre'
+release = eventlet.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/doc/real_index.html b/doc/real_index.html
index 183b4a0..a4d01da 100644
--- a/doc/real_index.html
+++ b/doc/real_index.html
@@ -35,7 +35,7 @@ easy_install eventlet
Alternately, you can download the source tarball:
diff --git a/eventlet/__init__.py b/eventlet/__init__.py
index ea5e5d0..33b5006 100644
--- a/eventlet/__init__.py
+++ b/eventlet/__init__.py
@@ -17,5 +17,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-version_info = (0, 9, '0')
+version_info = (0, 9, 0)
__version__ = '%s.%s.%s' % version_info
From dca933e578b013066e4fa8d532d6b113f99994b1 Mon Sep 17 00:00:00 2001
From: Ryan Williams
Date: Tue, 13 Oct 2009 21:12:33 -0700
Subject: [PATCH 4/5] Ooops correctly crediting Marcus for this test case.
---
tests/greenio_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/greenio_test.py b/tests/greenio_test.py
index 0d914ae..6791c9b 100644
--- a/tests/greenio_test.py
+++ b/tests/greenio_test.py
@@ -145,7 +145,7 @@ class TestGreenIo(LimitedTestCase):
client.close()
def test_sendall(self):
- # test adapted from Brian Brunswick's email
+ # test adapted from Marcus Cavanaugh's email
# it may legitimately take a while, but will eventually complete
self.timer.cancel()
second_bytes = 10
From f8ce3ee0c2b4febbea2a592fa16489b320d7502a Mon Sep 17 00:00:00 2001
From: Jared Kuolt
Date: Wed, 14 Oct 2009 22:34:44 -0700
Subject: [PATCH 5/5] Fix displayed download version
---
doc/real_index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/real_index.html b/doc/real_index.html
index a4d01da..cf0e610 100644
--- a/doc/real_index.html
+++ b/doc/real_index.html
@@ -35,7 +35,7 @@ easy_install eventlet
Alternately, you can download the source tarball:
@@ -102,4 +102,4 @@ easy_install eventlet