diff --git a/TODO.md b/TODO.md index 64daaac..a1d89ea 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,7 @@ ### Complete the structure: * [x] Support versioning -* Test use of `plpy` from python Package +* [x] Test use of `plpy` from python Package * Add integration tests * Add `pysal` dependency and wrapper diff --git a/python/crankshaft/crankshaft/poc/xyz.py b/python/crankshaft/crankshaft/poc/xyz.py index cd5160a..4e32596 100644 --- a/python/crankshaft/crankshaft/poc/xyz.py +++ b/python/crankshaft/crankshaft/poc/xyz.py @@ -1,3 +1,5 @@ +import plpy + def xyz(): - # print "XYZ" + plpy.notice('XYZ...') return "xyz-result" diff --git a/python/crankshaft/test/test_poc.py b/python/crankshaft/test/test_poc.py index 13285ea..06fc3d6 100644 --- a/python/crankshaft/test/test_poc.py +++ b/python/crankshaft/test/test_poc.py @@ -2,6 +2,13 @@ # -*- coding: utf-8 -*- import unittest + +class MockPlPy: + def notice(self, msg): + print msg + +import sys +sys.modules['plpy'] = MockPlPy() import crankshaft class TestPoc(unittest.TestCase):