def setUp(self):
     global hello
     hello = reload(hello)
     self.foo = UIMock()
     self.bar = UIMock()
     hello.register_ui('foo')(self.foo)
     hello.register_ui('bar')(self.bar)
     hello.message('foo', "message using the foo UI")
     hello.message('foo', "another message using foo")
     hello.message('bar', "message using the bar UI")
Example #2
0
File: tests.py Project: jython/book
 def setUp(self):        
     global hello
     hello = reload(hello)
     self.foo = UIMock()
     self.bar = UIMock()
     hello.register_ui('foo')(self.foo)    
     hello.register_ui('bar')(self.bar)
     hello.message('foo', "message using the foo UI")
     hello.message('foo', "another message using foo")
     hello.message('bar', "message using the bar UI")
Example #3
0
import hello

print hello.message('C')
print hello.message('module ' + hello.__file__)

for i in range(3):
    print hello.message(str(i))

Example #4
0
"import and use a C extension library module"

import hello
print(hello.message('C'))
print(hello.message('module ' + hello.__file__))

for i in range(3):
    reply = hello.message(str(i))
    print(reply)
Example #5
0
"""
import and use a C extension library module
www.moguf.com 2016-05-28
"""

import hello

print(hello.message('C'))
print(hello.message('module ' + hello.__file__))
Example #6
0
def function_handler(event, context):
    return message()