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
|
|
@ -2,73 +2,72 @@
|
|||
|
||||
import li_attribute
|
||||
|
||||
aa = li_attribute.A(1,2,3)
|
||||
aa = li_attribute.A(1, 2, 3)
|
||||
|
||||
if aa.a != 1:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
aa.a = 3
|
||||
if aa.a != 3:
|
||||
print aa.a
|
||||
raise RuntimeError
|
||||
print aa.a
|
||||
raise RuntimeError
|
||||
|
||||
if aa.b != 2:
|
||||
print aa.b
|
||||
raise RuntimeError
|
||||
print aa.b
|
||||
raise RuntimeError
|
||||
aa.b = 5
|
||||
if aa.b != 5:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
if aa.d != aa.b:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
if aa.c != 3:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
#aa.c = 5
|
||||
#if aa.c != 3:
|
||||
# if aa.c != 3:
|
||||
# raise RuntimeError
|
||||
|
||||
pi = li_attribute.Param_i(7)
|
||||
if pi.value != 7:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
pi.value=3
|
||||
pi.value = 3
|
||||
if pi.value != 3:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
b = li_attribute.B(aa)
|
||||
|
||||
if b.a.c != 3:
|
||||
raise RuntimeError
|
||||
|
||||
raise RuntimeError
|
||||
|
||||
# class/struct attribute with get/set methods using return/pass by reference
|
||||
myFoo = li_attribute.MyFoo()
|
||||
myFoo.x = 8
|
||||
myClass = li_attribute.MyClass()
|
||||
myClass.Foo = myFoo
|
||||
if myClass.Foo.x != 8:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
# class/struct attribute with get/set methods using return/pass by value
|
||||
myClassVal = li_attribute.MyClassVal()
|
||||
if myClassVal.ReadWriteFoo.x != -1:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
if myClassVal.ReadOnlyFoo.x != -1:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
myClassVal.ReadWriteFoo = myFoo
|
||||
if myClassVal.ReadWriteFoo.x != 8:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
if myClassVal.ReadOnlyFoo.x != 8:
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
|
||||
# string attribute with get/set methods using return/pass by value
|
||||
myStringyClass = li_attribute.MyStringyClass("initial string")
|
||||
if myStringyClass.ReadWriteString != "initial string":
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
if myStringyClass.ReadOnlyString != "initial string":
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
myStringyClass.ReadWriteString = "changed string"
|
||||
if myStringyClass.ReadWriteString != "changed string":
|
||||
raise RuntimeError
|
||||
raise RuntimeError
|
||||
if myStringyClass.ReadOnlyString != "changed string":
|
||||
raise RuntimeError
|
||||
|
||||
raise RuntimeError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue