Skip to content

Commit

Permalink
Removed examples of serialize.py in __main__. Moved to the test folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsargiot committed Feb 17, 2013
1 parent b30d231 commit 290ae5c
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions debugger_plugin/core/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,40 +87,3 @@ def serialize(name, expr, result, depth = 1):

return s_res


if __name__ == '__main__':
__flat_dict__ = {
'a': 'First letter',
'b': 'Second letter',
'c': 'Third letter',
}
__deep_dict__ = {
'uno': [1, 11, 111],
'dos': [2, 22, 222],
'tres': [3, 33, 333],
}

class _TestObject(object):
"""Class object to test serialization of object types."""

def __init__(self):
"""Testing method."""
self._attr = "a"

def un_metodo(self, unarg = None):
"""Testing method."""
return "Hola" + self._attr + repr(unarg)

def otro_metodo(self):
"""Testing method."""
return "Chau" + self._attr

__custom_obj__ = _TestObject()

import pprint
print "----- Serializing flat dictionary."
pprint.pprint(serialize('flat', 'flat', __flat_dict__))
print "----- Serializing deep dictionary."
pprint.pprint(serialize('deep', 'deep', __deep_dict__))
print "----- Serializing custom python object."
pprint.pprint(serialize('obj', 'obj', __custom_obj__))

0 comments on commit 290ae5c

Please sign in to comment.