Skip to content

bitshares_instance keeps getting lost #76

@jhtitor

Description

@jhtitor

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions