diff options
| author | Matej Cotman <cotman.matej@gmail.com> | 2014-01-12 12:40:27 +0100 |
|---|---|---|
| committer | Matej Cotman <cotman.matej@gmail.com> | 2014-01-14 23:31:15 +0100 |
| commit | e740c8a8ea7dc4bbda7dab9a63ec476167c209ef (patch) | |
| tree | 19fc35d68eb6570b4d4c8b04cf1f82a7d304dddc /searx/tests/test_robot.py | |
| parent | 348187cff9bc3c55c1327f3d7177e6d1a61b8430 (diff) | |
tests and robot tests framework, build overhaul
Diffstat (limited to 'searx/tests/test_robot.py')
| -rw-r--r-- | searx/tests/test_robot.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/searx/tests/test_robot.py b/searx/tests/test_robot.py new file mode 100644 index 000000000..1480ae8ef --- /dev/null +++ b/searx/tests/test_robot.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +from plone.testing import layered +from robotsuite import RobotTestSuite +from searx.testing import SEARXROBOTLAYER + +import os +import unittest2 as unittest + + +def test_suite(): + suite = unittest.TestSuite() + current_dir = os.path.abspath(os.path.dirname(__file__)) + robot_dir = os.path.join(current_dir, 'robot') + tests = [ + os.path.join('robot', f) for f in + os.listdir(robot_dir) if f.endswith('.robot') and + f.startswith('test_') + ] + for test in tests: + suite.addTests([ + layered(RobotTestSuite(test), layer=SEARXROBOTLAYER), + ]) + return suite |