Removed unused module 'meta.py'

This commit is contained in:
Stephan Erb 2009-11-05 17:05:13 +01:00
parent 8a127b4e4d
commit 7829e7d40c
2 changed files with 1 additions and 37 deletions

View File

@ -1,36 +0,0 @@
#!/usr/bin/python
import types
class VerboseClassType(type):
indent = ''
def __init__(cls, name, bases, dict):
super(VerboseClassType, cls).__init__(cls, name, bases, dict)
new = {}
print 'Initializing new class %s:' % cls
for fname, fun in dict.iteritems():
wrap = hasattr(fun, '__call__')
print '%s%s is %s, we %s wrap it.' % \
(cls.__class__.indent, fname, fun, wrap and 'will' or "won't")
if not wrap: continue
setattr(cls, fname, cls.wrap(name, fname, fun))
def wrap(cls, name, fname, fun):
def verbose(*a, **b):
args = ', '.join(map(repr, a)+map(lambda x:'%s=%r'%x, b.iteritems()))
print '%s%s.%s(%s):' % (cls.__class__.indent, name, fname, args)
cls.__class__.indent += '| '
r = fun(*a, **b)
cls.__class__.indent = cls.__class__.indent[:-4]
print '%s+=%r' % (cls.__class__.indent, r)
return r
verbose.__name__ = fname
return verbose
def nested_property(f):
ret = f()
p = {}
for v in ('fget', 'fset', 'fdel', 'doc'):
if v in ret: p[v]=ret[v]
return property(**p)

View File

@ -113,7 +113,7 @@ class TestClientCaps(CommonCapsTest):
"http://gajim.org#m3P2WeXPMGVH2tZPe7yITnfY0Dw=")
def test_client_supports(self):
contact = Contact(client_caps=self.client_caps)
contact = Contact(jid=None, account=None, client_caps=self.client_caps)
self.assertTrue(contact.supports(NS_PING),
msg="Assume supported, if we don't have caps")