def __repr__(self): l = ['<UnitOfWork>'] l.append(' <new>') l += [ ' %s' % indent(repr(x), 6) for x in self.new ] l.append(' <clean>') l += [ ' %s' % indent(repr(x), 6) for x in self.clean ] l.append(' <dirty>') l += [ ' %s' % indent(repr(x), 6) for x in self.dirty ] l.append(' <deleted>') l += [ ' %s' % indent(repr(x), 6) for x in self.deleted ] return '\n'.join(l)
def __repr__(self): l = [ '<imap>' ] for k,v in sorted(self._objects.iteritems()): l.append(indent(' %s : %s => %r' % (k[0].__name__, k[1], v), 4)) return '\n'.join(l)
def __repr__(self): l = [ '<imap (%d)>' % len(self._objects) ] for k,v in six.iteritems(self._objects): l.append(indent(' %s : %s => %r' % (k[0].__name__, k[1], v), 4)) return '\n'.join(l)
def __repr__(self): l = ['<imap (%d)>' % len(self._objects)] for k, v in six.iteritems(self._objects): l.append(indent(' %s : %s => %r' % (k[0].__name__, k[1], v), 4)) return '\n'.join(l)
def __repr__(self): l = ['<session>'] l.append(' ' + indent(repr(self.uow), 2)) l.append(' ' + indent(repr(self.imap), 2)) return '\n'.join(l)
def test_indent(self): s='''The quick brown fox jumped over the lazy dog''' lines = utils.indent(utils.wordwrap(s, width=20), 4).split('\n') self.assertEqual(lines[0], 'The quick brown fox') self.assertEqual(lines[1], ' jumped over the lazy') self.assertEqual(lines[2], ' dog')
def __repr__(self): l = ["<imap (%d)>" % len(self._objects)] for k, v in sorted(self._objects.iteritems()): l.append(indent(" %s : %s => %r" % (k[0].__name__, k[1], v), 4)) return "\n".join(l)