autopep8 cleanup of Examples/test-suite/python
automated cleanup of python pep8 whitespace compliance
This commit is contained in:
parent
9086eb351c
commit
b77f3afafb
202 changed files with 3477 additions and 3382 deletions
|
|
@ -1,41 +1,43 @@
|
|||
import director_basic
|
||||
|
||||
|
||||
class PyFoo(director_basic.Foo):
|
||||
def ping(self):
|
||||
return "PyFoo::ping()"
|
||||
|
||||
def ping(self):
|
||||
return "PyFoo::ping()"
|
||||
|
||||
|
||||
a = PyFoo()
|
||||
|
||||
if a.ping() != "PyFoo::ping()":
|
||||
raise RuntimeError, a.ping()
|
||||
raise RuntimeError, a.ping()
|
||||
|
||||
if a.pong() != "Foo::pong();PyFoo::ping()":
|
||||
raise RuntimeError, a.pong()
|
||||
raise RuntimeError, a.pong()
|
||||
|
||||
b = director_basic.Foo()
|
||||
|
||||
if b.ping() != "Foo::ping()":
|
||||
raise RuntimeError, b.ping()
|
||||
raise RuntimeError, b.ping()
|
||||
|
||||
if b.pong() != "Foo::pong();Foo::ping()":
|
||||
raise RuntimeError, b.pong()
|
||||
raise RuntimeError, b.pong()
|
||||
|
||||
a = director_basic.A1(1)
|
||||
|
||||
if a.rg(2) != 2:
|
||||
raise RuntimeError
|
||||
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
class PyClass(director_basic.MyClass):
|
||||
def method(self, vptr):
|
||||
self.cmethod = 7
|
||||
pass
|
||||
|
||||
def vmethod(self, b):
|
||||
b.x = b.x + 31
|
||||
return b
|
||||
|
||||
def method(self, vptr):
|
||||
self.cmethod = 7
|
||||
pass
|
||||
|
||||
def vmethod(self, b):
|
||||
b.x = b.x + 31
|
||||
return b
|
||||
|
||||
|
||||
b = director_basic.Bar(3)
|
||||
|
|
@ -50,49 +52,42 @@ bd = dd.cmethod(b)
|
|||
|
||||
cc.method(b)
|
||||
if c.cmethod != 7:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
if bc.x != 34:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if bd.x != 16:
|
||||
raise RuntimeError
|
||||
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
class PyMulti(director_basic.Foo, director_basic.MyClass):
|
||||
def __init__(self):
|
||||
director_basic.Foo.__init__(self)
|
||||
director_basic.MyClass.__init__(self)
|
||||
pass
|
||||
|
||||
|
||||
def vmethod(self, b):
|
||||
b.x = b.x + 31
|
||||
return b
|
||||
def __init__(self):
|
||||
director_basic.Foo.__init__(self)
|
||||
director_basic.MyClass.__init__(self)
|
||||
pass
|
||||
|
||||
|
||||
def ping(self):
|
||||
return "PyFoo::ping()"
|
||||
def vmethod(self, b):
|
||||
b.x = b.x + 31
|
||||
return b
|
||||
|
||||
def ping(self):
|
||||
return "PyFoo::ping()"
|
||||
|
||||
a = 0
|
||||
for i in range(0,100):
|
||||
for i in range(0, 100):
|
||||
pymult = PyMulti()
|
||||
pymult.pong()
|
||||
del pymult
|
||||
|
||||
del pymult
|
||||
|
||||
|
||||
pymult = PyMulti()
|
||||
|
||||
|
||||
|
||||
|
||||
p1 = director_basic.Foo_get_self(pymult)
|
||||
p2 = director_basic.MyClass_get_self(pymult)
|
||||
|
||||
p1.ping()
|
||||
p2.vmethod(bc)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue