14
0

Accepting request 942015 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/942015
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-eventlet?expand=0&rev=39
This commit is contained in:
2021-12-23 16:53:27 +00:00
committed by Git OBS Bridge
7 changed files with 191 additions and 174 deletions

View File

@@ -1,7 +1,141 @@
diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpool_test.py Index: eventlet-0.33.0/setup.py
--- eventlet-0.26.1-orig/tests/dagpool_test.py 2020-08-17 16:48:04.393065291 +0700 ===================================================================
+++ eventlet-0.26.1/tests/dagpool_test.py 2020-08-17 16:48:42.049502450 +0700 --- eventlet-0.33.0.orig/setup.py
@@ -162,7 +162,7 @@ +++ eventlet-0.33.0/setup.py
@@ -27,7 +27,7 @@ setuptools.setup(
'README.rst'
)
).read(),
- test_suite='nose.collector',
+ test_suite='tests',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
Index: eventlet-0.33.0/eventlet.egg-info/SOURCES.txt
===================================================================
--- eventlet-0.33.0.orig/eventlet.egg-info/SOURCES.txt
+++ eventlet-0.33.0/eventlet.egg-info/SOURCES.txt
@@ -175,7 +175,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
@@ -275,4 +274,4 @@ tests/stdlib/test_threading_local.py
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
Index: eventlet-0.33.0/tests/greenio_test.py
===================================================================
--- eventlet-0.33.0.orig/tests/greenio_test.py
+++ eventlet-0.33.0/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():
@@ -674,8 +672,8 @@ class TestGreenSocket(tests.LimitedTestC
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():
Index: eventlet-0.33.0/tests/nosewrapper.py
===================================================================
--- eventlet-0.33.0.orig/tests/nosewrapper.py
+++ eventlet-0.33.0/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()
Index: eventlet-0.33.0/tests/__init__.py
===================================================================
--- eventlet-0.33.0.orig/tests/__init__.py
+++ eventlet-0.33.0/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)
Index: eventlet-0.33.0/tests/dagpool_test.py
===================================================================
--- eventlet-0.33.0.orig/tests/dagpool_test.py
+++ eventlet-0.33.0/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"""
@@ -163,7 +162,7 @@ class Capture(object):
# a set. Make a set containing its elements. # a set. Make a set containing its elements.
setlist.append(set(subseq)) setlist.append(set(subseq))
# Now that we've massaged 'sequence' into 'setlist', compare. # Now that we've massaged 'sequence' into 'setlist', compare.
@@ -10,7 +144,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
# **************************************************************************** # ****************************************************************************
@@ -190,14 +190,14 @@ @@ -191,14 +190,14 @@ def test_init():
with check_no_suspend(): with check_no_suspend():
results = pool.waitall() results = pool.waitall()
# with no spawn() or post(), waitall() returns preload data # with no spawn() or post(), waitall() returns preload data
@@ -27,7 +161,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
def test_wait_each_empty(): def test_wait_each_empty():
@@ -215,10 +215,10 @@ @@ -216,10 +215,10 @@ def test_wait_each_preload():
with check_no_suspend(): with check_no_suspend():
# wait_each() may deliver in arbitrary order; collect into a dict # wait_each() may deliver in arbitrary order; collect into a dict
# for comparison # for comparison
@@ -40,7 +174,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
def post_each(pool, capture): def post_each(pool, capture):
@@ -256,7 +256,7 @@ @@ -257,7 +256,7 @@ def test_wait_posted():
eventlet.spawn(post_each, pool, capture) eventlet.spawn(post_each, pool, capture)
gotten = pool.wait("bcdefg") gotten = pool.wait("bcdefg")
capture.add("got all") capture.add("got all")
@@ -49,7 +183,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
dict(b=2, c=3, dict(b=2, c=3,
d="dval", e="eval", d="dval", e="eval",
f="fval", g="gval")) f="fval", g="gval"))
@@ -284,7 +284,7 @@ @@ -285,7 +284,7 @@ def test_spawn_collision_spawn():
pool = DAGPool() pool = DAGPool()
pool.spawn("a", (), lambda key, results: "aval") pool.spawn("a", (), lambda key, results: "aval")
# hasn't yet even started # hasn't yet even started
@@ -58,7 +192,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
with assert_raises(Collision): with assert_raises(Collision):
# Attempting to spawn again with same key should collide even if the # Attempting to spawn again with same key should collide even if the
# first spawned greenthread hasn't yet had a chance to run. # first spawned greenthread hasn't yet had a chance to run.
@@ -292,7 +292,7 @@ @@ -293,7 +292,7 @@ def test_spawn_collision_spawn():
# now let the spawned eventlet run # now let the spawned eventlet run
eventlet.sleep(0) eventlet.sleep(0)
# should have finished # should have finished
@@ -67,7 +201,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
with assert_raises(Collision): with assert_raises(Collision):
# Attempting to spawn with same key collides even when the greenthread # Attempting to spawn with same key collides even when the greenthread
# has completed. # has completed.
@@ -323,60 +323,60 @@ @@ -324,60 +323,60 @@ def test_spawn_multiple():
capture.step() capture.step()
# but none of them has yet produced a result # but none of them has yet produced a result
for k in "defgh": for k in "defgh":
@@ -160,7 +294,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
capture.validate([ capture.validate([
["h got b", "h got c"], ["h got b", "h got c"],
@@ -431,13 +431,13 @@ @@ -432,13 +431,13 @@ def test_spawn_many():
spin() spin()
# verify that e completed (also that post(key) within greenthread # verify that e completed (also that post(key) within greenthread
# overrides implicit post of return value, which would be None) # overrides implicit post of return value, which would be None)
@@ -176,7 +310,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
[set(["a done"]), [set(["a done"]),
set(["b done", "c done"]), set(["b done", "c done"]),
set(["d done"]), set(["d done"]),
@@ -465,7 +465,7 @@ @@ -466,7 +465,7 @@ def test_wait_each_all():
for pos in range(len(keys)): for pos in range(len(keys)):
# next value from wait_each() # next value from wait_each()
k, v = next(each) k, v = next(each)
@@ -185,7 +319,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
# advance every pool greenlet as far as it can go # advance every pool greenlet as far as it can go
spin() spin()
# everything from keys[:pos+1] should have a value by now # everything from keys[:pos+1] should have a value by now
@@ -493,7 +493,7 @@ @@ -494,7 +493,7 @@ def test_kill():
pool.kill("a") pool.kill("a")
# didn't run # didn't run
spin() spin()
@@ -194,7 +328,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
# killing it forgets about it # killing it forgets about it
with assert_raises(KeyError): with assert_raises(KeyError):
pool.kill("a") pool.kill("a")
@@ -504,7 +504,7 @@ @@ -505,7 +504,7 @@ def test_kill():
with assert_raises(KeyError): with assert_raises(KeyError):
pool.kill("a") pool.kill("a")
# verify it ran to completion # verify it ran to completion
@@ -203,7 +337,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
def test_post_collision_preload(): def test_post_collision_preload():
@@ -532,7 +532,7 @@ @@ -533,7 +532,7 @@ def test_post_collision_spawn():
pool.kill("a") pool.kill("a")
# now we can post # now we can post
pool.post("a", 3) pool.post("a", 3)
@@ -212,7 +346,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
pool = DAGPool() pool = DAGPool()
pool.spawn("a", (), lambda key, result: 4) pool.spawn("a", (), lambda key, result: 4)
@@ -552,10 +552,10 @@ @@ -553,10 +552,10 @@ def test_post_replace():
pool = DAGPool() pool = DAGPool()
pool.post("a", 1) pool.post("a", 1)
pool.post("a", 2, replace=True) pool.post("a", 2, replace=True)
@@ -227,7 +361,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
def waitfor(capture, pool, key): def waitfor(capture, pool, key):
@@ -597,14 +597,14 @@ @@ -598,14 +597,14 @@ def test_waitall_exc():
try: try:
pool.waitall() pool.waitall()
except PropagateError as err: except PropagateError as err:
@@ -247,7 +381,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
def test_propagate_exc(): def test_propagate_exc():
@@ -615,20 +615,20 @@ @@ -616,20 +615,20 @@ def test_propagate_exc():
try: try:
pool["c"] pool["c"]
except PropagateError as errc: except PropagateError as errc:
@@ -277,7 +411,7 @@ diff -ur eventlet-0.26.1-orig/tests/dagpool_test.py eventlet-0.26.1/tests/dagpoo
def test_wait_each_exc(): def test_wait_each_exc():
@@ -680,13 +680,13 @@ @@ -681,13 +680,13 @@ def test_post_get_exc():
pass pass
# wait_each_success() filters # wait_each_success() filters

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2f0bb8ed0dc0ab21d683975d5d8ab3c054d588ce61def9faf7a465ee363e839b
size 412769

3
eventlet-0.33.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:80144f489c1bb273a51b6f96ff9785a382d2866b9bab1f5bd748385019f4141f
size 414929

View File

@@ -1,9 +1,9 @@
Index: eventlet-0.32.0/eventlet/support/greendns.py Index: eventlet-0.33.0/eventlet/support/greendns.py
=================================================================== ===================================================================
--- eventlet-0.32.0.orig/eventlet/support/greendns.py --- eventlet-0.33.0.orig/eventlet/support/greendns.py
+++ eventlet-0.32.0/eventlet/support/greendns.py +++ eventlet-0.33.0/eventlet/support/greendns.py
@@ -325,7 +325,7 @@ class ResolverProxy(object): @@ -339,7 +339,7 @@ class ResolverProxy(object):
self.clear() self._cached_resolver = value
def clear(self): def clear(self):
- self._resolver = dns.resolver.Resolver(filename=self._filename) - self._resolver = dns.resolver.Resolver(filename=self._filename)
@@ -11,11 +11,11 @@ Index: eventlet-0.32.0/eventlet/support/greendns.py
self._resolver.cache = dns.resolver.LRUCache() self._resolver.cache = dns.resolver.LRUCache()
def query(self, qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN, def query(self, qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN,
Index: eventlet-0.32.0/tests/greendns_test.py Index: eventlet-0.33.0/tests/greendns_test.py
=================================================================== ===================================================================
--- eventlet-0.32.0.orig/tests/greendns_test.py --- eventlet-0.33.0.orig/tests/greendns_test.py
+++ eventlet-0.32.0/tests/greendns_test.py +++ eventlet-0.33.0/tests/greendns_test.py
@@ -885,7 +885,7 @@ class TinyDNSTests(tests.LimitedTestCase @@ -888,7 +888,7 @@ class TinyDNSTests(tests.LimitedTestCase
# https://github.com/eventlet/eventlet/issues/499 # https://github.com/eventlet/eventlet/issues/499
# None means we don't want the server to find the IP # None means we don't want the server to find the IP
with tests.dns_tcp_server(None) as dnsaddr: with tests.dns_tcp_server(None) as dnsaddr:
@@ -24,7 +24,7 @@ Index: eventlet-0.32.0/tests/greendns_test.py
resolver.nameservers = [dnsaddr[0]] resolver.nameservers = [dnsaddr[0]]
resolver.nameserver_ports[dnsaddr[0]] = dnsaddr[1] resolver.nameserver_ports[dnsaddr[0]] = dnsaddr[1]
@@ -896,7 +896,7 @@ class TinyDNSTests(tests.LimitedTestCase @@ -899,7 +899,7 @@ class TinyDNSTests(tests.LimitedTestCase
# https://github.com/eventlet/eventlet/issues/499 # https://github.com/eventlet/eventlet/issues/499
expected_ip = "192.168.1.1" expected_ip = "192.168.1.1"
with tests.dns_tcp_server(expected_ip) as dnsaddr: with tests.dns_tcp_server(expected_ip) as dnsaddr:

View File

@@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Dec 16 20:11:12 UTC 2021 - Ben Greiner <code@bnavigator.de>
- update to 0.33.0
* green.thread: unlocked Lock().release() should raise exception,
returned True
* wsgi: Dont break HTTP framing during 100-continue handling
* Python 3.10 partial support
* greendns: Create a DNS resolver lazily rather than on import
* ssl: GreenSSLContext minimum_version and maximum_version
setters
- Refresh denosing patches: merge remove_nose.patch and
remove_nose_part_2.patch into denose-eventlet.patch
- Refresh newdnspython.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Nov 7 21:12:37 UTC 2021 - Dirk Müller <dmueller@suse.com> Sun Nov 7 21:12:37 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@@ -17,8 +17,9 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-eventlet Name: python-eventlet
Version: 0.32.0 Version: 0.33.0
Release: 0 Release: 0
Summary: Concurrent networking library for Python Summary: Concurrent networking library for Python
License: MIT License: MIT
@@ -27,13 +28,11 @@ URL: http://eventlet.net
Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com # PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com
# Removes dependency on nose # Removes dependency on nose
Patch0: remove_nose.patch Patch0: denose-eventlet.patch
# PATCH-FIX-UPSTREAM newdnspython.patch mcepl@suse.com -- patch is from gh#rthalley/dnspython#519, discussion in gh#eventlet/eventlet#638 # PATCH-FIX-UPSTREAM newdnspython.patch mcepl@suse.com -- patch is from gh#rthalley/dnspython#519, discussion in gh#eventlet/eventlet#638
Patch1: newdnspython.patch Patch1: newdnspython.patch
# Really remove the dependency on nose
Patch3: remove_nose_part_2.patch
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
%if 0%{?suse_version} < 1550 %if %{with python2}
BuildRequires: python2-monotonic >= 1.4 BuildRequires: python2-monotonic >= 1.4
%endif %endif
BuildRequires: fdupes BuildRequires: fdupes
@@ -95,6 +94,8 @@ skiptests="(BackdoorTest and test_server)"
skiptests+=" or test_dns_methods_are_green or test_noraise_dns_tcp" skiptests+=" or test_dns_methods_are_green or test_noraise_dns_tcp"
# These are flaky inside the OBS environment # These are flaky inside the OBS environment
skiptests+=" or test_fork_after_monkey_patch or test_send_1k_req_rep or test_cpu_usage_after_bind" skiptests+=" or test_fork_after_monkey_patch or test_send_1k_req_rep or test_cpu_usage_after_bind"
# tracebacks in denosed suite with pytest inside obs presumably work different than when upstream is running nose?
skiptests+=" or test_leakage_from_tracebacks"
# Unknown Python 3.6 specific errors # Unknown Python 3.6 specific errors
# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket # TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket
@@ -104,6 +105,10 @@ python36_skiptests+=" or ssl_test or wsgi_test"
%if %python3_version_nodots == 36 %if %python3_version_nodots == 36
python3_skiptests+="$python36_skiptests" python3_skiptests+="$python36_skiptests"
%endif %endif
# https://github.com/eventlet/eventlet/issues/730
python310_skiptests+=" or test_patcher_existing_locks_locked"
# https://github.com/eventlet/eventlet/issues/739
python310_skiptests+=" or test_017_ssl_zeroreturnerror"
# no subdir recursion https://github.com/eventlet/eventlet/issues/638#issuecomment-676085599 # no subdir recursion https://github.com/eventlet/eventlet/issues/638#issuecomment-676085599
%pytest -o norecursedirs="tests/*" -k "not ($skiptests ${$python_skiptests})" ${$python_pytest_param} %pytest -o norecursedirs="tests/*" -k "not ($skiptests ${$python_skiptests})" ${$python_pytest_param}

View File

@@ -1,137 +0,0 @@
Index: eventlet-0.32.0/setup.py
===================================================================
--- eventlet-0.32.0.orig/setup.py
+++ eventlet-0.32.0/setup.py
@@ -27,7 +27,7 @@ setuptools.setup(
'README.rst'
)
).read(),
- test_suite='nose.collector',
+ test_suite='tests',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
Index: eventlet-0.32.0/eventlet.egg-info/SOURCES.txt
===================================================================
--- eventlet-0.32.0.orig/eventlet.egg-info/SOURCES.txt
+++ eventlet-0.32.0/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
@@ -273,4 +272,4 @@ tests/stdlib/test_threading_local.py
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
Index: eventlet-0.32.0/tests/greenio_test.py
===================================================================
--- eventlet-0.32.0.orig/tests/greenio_test.py
+++ eventlet-0.32.0/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():
@@ -674,8 +672,8 @@ class TestGreenSocket(tests.LimitedTestC
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():
Index: eventlet-0.32.0/tests/nosewrapper.py
===================================================================
--- eventlet-0.32.0.orig/tests/nosewrapper.py
+++ eventlet-0.32.0/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()
Index: eventlet-0.32.0/tests/__init__.py
===================================================================
--- eventlet-0.32.0.orig/tests/__init__.py
+++ eventlet-0.32.0/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)
Index: eventlet-0.32.0/tests/dagpool_test.py
===================================================================
--- eventlet-0.32.0.orig/tests/dagpool_test.py
+++ eventlet-0.32.0/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"""