~ubuntu-branches/ubuntu/utopic/python-eventlet/utopic

« back to all changes in this revision

Viewing changes to tests/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2011-05-17 11:52:34 UTC
  • mfrom: (1.1.4 upstream) (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110517115234-fcxnkhmr7kcvesdz
Tags: 0.9.15-0ubuntu1
* New upstream release.
  - Drop wrap-greenpipe.patch: Included upstream.
  - Drop disable-psycopg-patcher-test.patch: Included upstream.
* Merge packaging changes from Debian.
* Disable zmq (tests do not pass).

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
    from eventlet.hubs import get_hub
89
89
    return 'pyevent' in type(get_hub()).__module__
90
90
 
91
 
 
92
 
def using_zmq(_f):
93
 
    try:
94
 
        import zmq
95
 
    except ImportError:
96
 
        return False
97
 
    from eventlet.hubs import get_hub
98
 
    return zmq and 'zeromq' in type(get_hub()).__module__
99
 
 
100
 
def skip_unless_zmq(func):
101
 
    """ Decorator that skips a test if we're not using the zeromq hub."""
102
 
    return skip_unless(using_zmq)(func)
103
 
 
104
 
def skip_with_zmq(func):
105
 
    """ Decorator that skips a test if we're using the zeromq hub."""
106
 
    return skip_if(using_zmq)(func)
107
 
 
108
91
    
109
92
def skip_with_pyevent(func):
110
93
    """ Decorator that skips a test if we're using the pyevent hub."""