diff options
Diffstat (limited to 'tests/example_module.py')
-rw-r--r-- | tests/example_module.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/example_module.py b/tests/example_module.py new file mode 100644 index 0000000..6c29435 --- /dev/null +++ b/tests/example_module.py @@ -0,0 +1,16 @@ +# Copyright (C) by Josh Blum. See LICENSE.txt for licensing information. + +import gras + +class MyBlock(gras.Block): + def __init__(self): + gras.Block.__init__(self, "MyBlock") + self.foo = 0 + self.register_call("get_num", self.get_num) + + def work(self, *args): pass + + def get_num(self): + return 42 + +gras.Factory.register_make("/tests/my_block1", MyBlock) |