summaryrefslogtreecommitdiffstats
path: root/themis
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2011-10-30 14:58:20 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2011-10-30 14:58:20 (GMT)
commit3c7e28b883b20b5c15fcb2d6c4d657bebfd95423 (patch)
tree1866d59f27ebe508ed94c6559c0156635ab5b1ae /themis
downloadthemis.ocrloader-3c7e28b883b20b5c15fcb2d6c4d657bebfd95423.zip
themis.ocrloader-3c7e28b883b20b5c15fcb2d6c4d657bebfd95423.tar.gz
themis.ocrloader-3c7e28b883b20b5c15fcb2d6c4d657bebfd95423.tar.bz2
initial commit
Diffstat (limited to 'themis')
-rw-r--r--themis/__init__.py6
-rw-r--r--themis/ocrloader/__init__.py4
-rw-r--r--themis/ocrloader/configure.zcml11
-rw-r--r--themis/ocrloader/tests.py55
4 files changed, 76 insertions, 0 deletions
diff --git a/themis/__init__.py b/themis/__init__.py
new file mode 100644
index 0000000..f48ad10
--- /dev/null
+++ b/themis/__init__.py
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
diff --git a/themis/ocrloader/__init__.py b/themis/ocrloader/__init__.py
new file mode 100644
index 0000000..51e7de6
--- /dev/null
+++ b/themis/ocrloader/__init__.py
@@ -0,0 +1,4 @@
+ # -*- extra stuff goes here -*-
+
+def initialize(context):
+ """Initializer called when used as a Zope 2 product."""
diff --git a/themis/ocrloader/configure.zcml b/themis/ocrloader/configure.zcml
new file mode 100644
index 0000000..eecd883
--- /dev/null
+++ b/themis/ocrloader/configure.zcml
@@ -0,0 +1,11 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:five="http://namespaces.zope.org/five"
+ xmlns:i18n="http://namespaces.zope.org/i18n"
+ i18n_domain="themis.ocrloader">
+
+ <five:registerPackage package="." initialize=".initialize" />
+
+ <!-- -*- extra stuff goes here -*- -->
+
+</configure>
diff --git a/themis/ocrloader/tests.py b/themis/ocrloader/tests.py
new file mode 100644
index 0000000..44cce69
--- /dev/null
+++ b/themis/ocrloader/tests.py
@@ -0,0 +1,55 @@
+import unittest
+
+#from zope.testing import doctestunit
+#from zope.component import testing
+from Testing import ZopeTestCase as ztc
+
+from Products.Five import fiveconfigure
+from Products.PloneTestCase import PloneTestCase as ptc
+from Products.PloneTestCase.layer import PloneSite
+ptc.setupPloneSite()
+
+import themis.ocrloader
+
+
+class TestCase(ptc.PloneTestCase):
+
+ class layer(PloneSite):
+
+ @classmethod
+ def setUp(cls):
+ fiveconfigure.debug_mode = True
+ ztc.installPackage(themis.ocrloader)
+ fiveconfigure.debug_mode = False
+
+ @classmethod
+ def tearDown(cls):
+ pass
+
+
+def test_suite():
+ return unittest.TestSuite([
+
+ # Unit tests
+ #doctestunit.DocFileSuite(
+ # 'README.txt', package='themis.ocrloader',
+ # setUp=testing.setUp, tearDown=testing.tearDown),
+
+ #doctestunit.DocTestSuite(
+ # module='themis.ocrloader.mymodule',
+ # setUp=testing.setUp, tearDown=testing.tearDown),
+
+
+ # Integration tests that use PloneTestCase
+ #ztc.ZopeDocFileSuite(
+ # 'README.txt', package='themis.ocrloader',
+ # test_class=TestCase),
+
+ #ztc.FunctionalDocFileSuite(
+ # 'browser.txt', package='themis.ocrloader',
+ # test_class=TestCase),
+
+ ])
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')