Skip to content

Commit

Permalink
Run tests on robot_widgets folder
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Mar 3, 2014
1 parent b6639fc commit 069fe65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plone/app/widgets/tests/test_robot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from plone.app.widgets.testing import PLONEAPPWIDGETS_DX_ROBOT_TESTING
from plone.app.widgets.testing import SELECT_WIDGET_ROBOT_TESTING
from plone.testing import layered
import os
import robotsuite
Expand All @@ -24,4 +25,19 @@ def test_suite():
layered(robottestsuite,
layer=PLONEAPPWIDGETS_DX_ROBOT_TESTING),
])

robot_widgets_dir = os.path.join(current_dir, 'robot_widgets')
robot_widgets_tests = [
os.path.join('robot_widgets', doc) for doc in
os.listdir(robot_widgets_dir) if doc.endswith('.robot') and
doc.startswith('test_')
]
for robot_test in robot_widgets_tests:
robottestsuite = robotsuite.RobotTestSuite(robot_test)
robottestsuite.level = ROBOT_TEST_LEVEL
suite.addTests([
layered(robottestsuite,
layer=SELECT_WIDGET_ROBOT_TESTING),
])

return suite

0 comments on commit 069fe65

Please sign in to comment.