Add missing python test file
This commit is contained in:
parent
bbd4d6b430
commit
b249b3c9e3
1 changed files with 24 additions and 0 deletions
24
support/test/python/simple_python/main.py
Executable file
24
support/test/python/simple_python/main.py
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
|
||||||
|
class TestClass( object ):
|
||||||
|
def __init__( self, value ):
|
||||||
|
self._var = value
|
||||||
|
self.DoSomething()
|
||||||
|
|
||||||
|
def DoSomething( self ):
|
||||||
|
for i in range( 0, 100 ):
|
||||||
|
if i < self._var:
|
||||||
|
print( '{0} is less than the value'.format( i ) )
|
||||||
|
else:
|
||||||
|
print( '{0} might be more'.format( i ) )
|
||||||
|
|
||||||
|
|
||||||
|
def Main():
|
||||||
|
t = TestClass( 18 )
|
||||||
|
|
||||||
|
t._var = 99
|
||||||
|
t.DoSomething()
|
||||||
|
|
||||||
|
|
||||||
|
Main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue