This is a systematic problem; see #67, #74. It has gotten better in the develop branch, but I'm still unsure if we can ever catch them all.
Here's what I'm using:
class BrokenBitsharesInstance():
def __init__(self, *args, **kwargs):
pass
def __getattr__(self, name):
raise ValueError("Attempting to use BrokenBitsharesInstance")
class BitsharesIsolator(object):
enabled = False
@classmethod
def enable(self):
if not self.enabled:
from bitshares.instance import set_shared_bitshares_instance
broken = BrokenBitsharesInstance()
set_shared_bitshares_instance(broken)
self.enabled = True
Maybe something like that should be implemented into tests somehow?
This is a systematic problem; see #67, #74. It has gotten better in the
developbranch, but I'm still unsure if we can ever catch them all.Here's what I'm using:
Maybe something like that should be implemented into tests somehow?