2020-08-13 16:09:43 +00:00
|
|
|
--- a/setup.py
|
|
|
|
+++ b/setup.py
|
2020-08-14 21:30:58 +00:00
|
|
|
@@ -27,7 +27,7 @@ setuptools.setup(
|
2020-08-13 16:09:43 +00:00
|
|
|
'README.rst'
|
|
|
|
)
|
|
|
|
).read(),
|
|
|
|
- test_suite='nose.collector',
|
|
|
|
+ test_suite='tests',
|
|
|
|
classifiers=[
|
|
|
|
"Development Status :: 4 - Beta",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
--- a/eventlet.egg-info/SOURCES.txt
|
|
|
|
+++ b/eventlet.egg-info/SOURCES.txt
|
|
|
|
@@ -174,7 +174,6 @@ tests/greenthread_test.py
|
|
|
|
tests/hub_test.py
|
|
|
|
tests/mock.py
|
|
|
|
tests/mysqldb_test.py
|
|
|
|
-tests/nosewrapper.py
|
|
|
|
tests/openssl_test.py
|
|
|
|
tests/os_test.py
|
|
|
|
tests/parse_results.py
|
2020-08-14 21:30:58 +00:00
|
|
|
@@ -270,4 +269,4 @@ tests/stdlib/test_threading_local.py
|
2020-08-13 16:09:43 +00:00
|
|
|
tests/stdlib/test_timeout.py
|
|
|
|
tests/stdlib/test_urllib.py
|
|
|
|
tests/stdlib/test_urllib2.py
|
|
|
|
-tests/stdlib/test_urllib2_localnet.py
|
|
|
|
\ No newline at end of file
|
|
|
|
+tests/stdlib/test_urllib2_localnet.py
|
|
|
|
--- a/tests/greenio_test.py
|
|
|
|
+++ b/tests/greenio_test.py
|
|
|
|
@@ -9,8 +9,6 @@ import socket as _orig_sock
|
|
|
|
import sys
|
|
|
|
import tempfile
|
|
|
|
|
|
|
|
-from nose.tools import eq_
|
|
|
|
-
|
|
|
|
import eventlet
|
|
|
|
from eventlet import event, greenio, debug
|
|
|
|
from eventlet.hubs import get_hub
|
|
|
|
@@ -39,7 +37,7 @@ def expect_socket_timeout(function, *arg
|
|
|
|
raise AssertionError("socket.timeout not raised")
|
|
|
|
except socket.timeout as e:
|
|
|
|
assert hasattr(e, 'args')
|
|
|
|
- eq_(e.args[0], 'timed out')
|
|
|
|
+ assert e.args[0] == 'timed out'
|
|
|
|
|
|
|
|
|
|
|
|
def min_buf_size():
|
2020-08-14 21:30:58 +00:00
|
|
|
@@ -674,8 +672,8 @@ class TestGreenSocket(tests.LimitedTestC
|
2020-08-13 16:09:43 +00:00
|
|
|
sender.sendto(b'second', 0, address)
|
|
|
|
|
|
|
|
sender_address = ('127.0.0.1', sender.getsockname()[1])
|
|
|
|
- eq_(receiver.recvfrom(1024), (b'first', sender_address))
|
|
|
|
- eq_(receiver.recvfrom(1024), (b'second', sender_address))
|
|
|
|
+ assert receiver.recvfrom(1024) == (b'first', sender_address)
|
|
|
|
+ assert receiver.recvfrom(1024) == (b'second', sender_address)
|
|
|
|
|
|
|
|
|
|
|
|
def test_get_fileno_of_a_socket_works():
|
|
|
|
--- a/tests/nosewrapper.py
|
|
|
|
+++ b/tests/nosewrapper.py
|
|
|
|
@@ -1,20 +1,13 @@
|
|
|
|
""" This script simply gets the paths correct for testing eventlet with the
|
|
|
|
hub extension for Nose."""
|
|
|
|
-import nose
|
|
|
|
from os.path import dirname, realpath, abspath
|
|
|
|
import sys
|
|
|
|
+import unittest
|
|
|
|
|
|
|
|
|
|
|
|
parent_dir = dirname(dirname(realpath(abspath(__file__))))
|
|
|
|
if parent_dir not in sys.path:
|
|
|
|
sys.path.insert(0, parent_dir)
|
|
|
|
|
|
|
|
-# hudson does a better job printing the test results if the exit value is 0
|
|
|
|
-zero_status = '--force-zero-status'
|
|
|
|
-if zero_status in sys.argv:
|
|
|
|
- sys.argv.remove(zero_status)
|
|
|
|
- launch = nose.run
|
|
|
|
-else:
|
|
|
|
- launch = nose.main
|
|
|
|
-
|
|
|
|
-launch(argv=sys.argv)
|
|
|
|
+if __name__ == '__main__':
|
|
|
|
+ unittest.main()
|
|
|
|
--- a/tests/__init__.py
|
|
|
|
+++ b/tests/__init__.py
|
|
|
|
@@ -20,7 +20,7 @@ import sys
|
|
|
|
import unittest
|
|
|
|
import warnings
|
|
|
|
|
|
|
|
-from nose.plugins.skip import SkipTest
|
|
|
|
+from unittest import SkipTest
|
|
|
|
|
|
|
|
import eventlet
|
|
|
|
from eventlet import tpool
|
|
|
|
@@ -223,7 +223,6 @@ class LimitedTestCase(unittest.TestCase)
|
|
|
|
def check_idle_cpu_usage(duration, allowed_part):
|
|
|
|
if resource is None:
|
|
|
|
# TODO: use https://code.google.com/p/psutil/
|
|
|
|
- from nose.plugins.skip import SkipTest
|
|
|
|
raise SkipTest('CPU usage testing not supported (`import resource` failed)')
|
|
|
|
|
|
|
|
r1 = resource.getrusage(resource.RUSAGE_SELF)
|
|
|
|
--- a/tests/dagpool_test.py
|
|
|
|
+++ b/tests/dagpool_test.py
|
|
|
|
@@ -5,7 +5,6 @@
|
|
|
|
@brief Test DAGPool class
|
|
|
|
"""
|
|
|
|
|
|
|
|
-from nose.tools import *
|
|
|
|
import eventlet
|
|
|
|
from eventlet.dagpool import DAGPool, Collision, PropagateError
|
|
|
|
import six
|
|
|
|
@@ -13,8 +12,8 @@ from contextlib import contextmanager
|
|
|
|
import itertools
|
|
|
|
|
|
|
|
|
|
|
|
-# Not all versions of nose.tools.assert_raises() support the usage in this
|
|
|
|
-# module, but it's straightforward enough to code that explicitly.
|
|
|
|
+# Not all versions of assert_raises() support the usage in this module,
|
|
|
|
+# but it's straightforward enough to code that explicitly.
|
|
|
|
@contextmanager
|
|
|
|
def assert_raises(exc):
|
|
|
|
"""exc is an exception class"""
|