[Pydev-cvs] org.python.pydev.refactoring/tests/python/adapter/module testModuleClassAlias.py, NONE,
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2007-02-26 21:08:24
|
Update of /cvsroot/pydev/org.python.pydev.refactoring/tests/python/adapter/module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32248/tests/python/adapter/module Added Files: testModuleClassAlias.py testModuleFQName.py Log Message: --- NEW FILE: testModuleClassAlias.py --- import bla as blaAlias from bla.bar import hullu as foo from bla import bar as myfoofile from bla.sub.foo import foohullu as foohulluAlias class bar(foo): hullu = "hullu" class nested: mybar = "123" class foobar(myfoofile.hullu): pass ##c ''' <config> <resolveNames> <string>foo</string> <string>blaAlias</string> <string>myfoofile.hullu</string> </resolveNames> </config> ''' ##r # foo -> bla.bar.hullu # blaAlias -> bla. # myfoofile.hullu -> bla.bar.hullu # Imported regular modules (Alias, Realname) # blaAlias bla # AliasToIdentifier (Module, Realname, Alias) # bla.bar hullu foo # bla bar myfoofile # bla.sub.foo foohullu foohulluAlias --- NEW FILE: testModuleFQName.py --- import httplib as foo from httplib import HTTP as bar from httplib import HTTP_PORT as port class a(bar): pass class b(foo.HTTPConnection): pass print port ##c ''' <config> <resolveNames> <string>bar</string> <string>foo.HTTPConnection</string> <string>port</string> </resolveNames> </config> ''' ##r # bar -> httplib.HTTP # foo.HTTPConnection -> httplib.HTTPConnection # port -> httplib.HTTP_PORT # Imported regular modules (Alias, Realname) # foo httplib # AliasToIdentifier (Module, Realname, Alias) # httplib HTTP bar # httplib HTTP_PORT port |