Example #1
0
def misc__get_attributes():
    test_instance = TestClass(1, 2, 3)
    assert get_attributes(test_instance) == {"a_one": 1, "a_two": 2, "a_three": 3}
Example #2
0
 def __repr__(self):
     attribute_string = ", ".join("%s=%s" % (k[0], self._format(k[1])) for k in get_attributes(self).items())
     return "%s(%s)" % (type(self).__name__, attribute_string)