Commit 3a4c73b4 authored by Jason Madden's avatar Jason Madden

Let tests continue without objgraph; if you ask for leakchecks you get warnings.

parent 29e795ee
...@@ -25,7 +25,11 @@ import types ...@@ -25,7 +25,11 @@ import types
from functools import wraps from functools import wraps
import unittest import unittest
import objgraph try:
import objgraph
except ImportError:
# Optional test dependency
objgraph = None
import gevent import gevent
import gevent.core import gevent.core
...@@ -193,6 +197,11 @@ class _RefCountChecker(object): ...@@ -193,6 +197,11 @@ class _RefCountChecker(object):
def wrap_refcount(method): def wrap_refcount(method):
if objgraph is None:
import warnings
warnings.warn("objgraph not available, leakchecks disabled")
return method
if getattr(method, 'ignore_leakcheck', False): if getattr(method, 'ignore_leakcheck', False):
return method return method
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment