feat: repr
This commit is contained in:
parent
78f051a231
commit
eec0d899dc
@ -183,10 +183,10 @@ class ReplicatedDatablock(object):
|
||||
raise NotImplementedError
|
||||
|
||||
def __repr__(self):
|
||||
return "{uuid} - Owner: {owner} - ETA: {state} ".format(
|
||||
return "{uuid} - owner: {owner} - type: {type}".format(
|
||||
uuid=self.uuid,
|
||||
owner=self.owner,
|
||||
state=self.state
|
||||
type=self.str_type
|
||||
)
|
||||
|
||||
class RepCommand(ReplicatedDatablock):
|
||||
|
@ -25,6 +25,12 @@ class ReplicationGraph(collections.MutableMapping):
|
||||
def __len__(self):
|
||||
return len(self.store)
|
||||
|
||||
def __repr__(self):
|
||||
str = "\n"
|
||||
for key,item in self.store.items():
|
||||
str+=repr(item)
|
||||
return str
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ import cProfile
|
||||
import re
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class SampleData():
|
||||
def __init__(self, map={"sample":"data"}):
|
||||
@ -189,7 +189,7 @@ class TestClient(unittest.TestCase):
|
||||
|
||||
client.unregister(data_sample_key)
|
||||
|
||||
|
||||
logger.debug(client._rep_store)
|
||||
client.disconnect()
|
||||
client2.disconnect()
|
||||
server.stop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user