You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/logbook/files/logbook-0.4.1-testspy3.patch

46 lines
1.7 KiB

See https://github.com/Sapphire64/logbook/commit/384f79006a17098817f6402765bbec273759da58
diff -ur Logbook-0.4.1.orig/logbook/base.py Logbook-0.4.1/logbook/base.py
--- logbook/base.py 2012-12-12 00:00:36.000000000 +0800
+++ logbook/base.py 2013-02-21 18:46:19.955740703 +0800
@@ -22,7 +22,7 @@
try:
from logbook._speedups import group_reflected_property, \
ContextStackManager, StackedObject
-except ImportError:
+except (ImportError, NameError):
from logbook._fallback import group_reflected_property, \
ContextStackManager, StackedObject
# Skip until hopefully a fiz for pyzmq down the track
diff -ur Logbook-0.4.1.orig/logbook/testsuite/test_regular.py Logbook-0.4.1/logbook/testsuite/test_regular.py
--- logbook/testsuite/test_regular.py 2012-12-12 00:00:36.000000000 +0800
+++ logbook/testsuite/test_regular.py 2013-02-21 21:48:45.616679871 +0800
@@ -17,7 +17,10 @@
import thread
import pickle
import shutil
-import unittest
+if sys.version_info[:2] == (2, 7) or sys.version_info[:2] >= (3, 2):
+ import unittest
+else:
+ import unittest2 as unittest
import tempfile
import socket
from datetime import datetime, timedelta
@@ -1299,6 +1302,7 @@
time.sleep(0.1)
return handler, subscriber
+ @unittest.skipIf(sys.version_info[:2] >= (3, 1), "tests fail due to pyzmq")
@require('zmq')
def test_zeromq_handler(self):
tests = [
@@ -1317,6 +1321,7 @@
finally:
handler.pop_thread()
+ @unittest.skipIf(sys.version_info[:2] >= (3, 1), "tests fail due to pyzmq")
@require('zmq')
def test_zeromq_background_thread(self):
handler, subscriber = self._get_zeromq()