Salome HOME
Improve detection of inversed arc (issue #1677).
[modules/shaper.git] / test.squish / suite_FEATURE_PARAMETERS / shared / scripts / bdd_hooks.py
1 # -*- coding: utf-8 -*-
2
3 # This file contains hook functions to run as the .feature file is executed.
4 #
5 # A common use-case is to use the OnScenarioStart/OnScenarioEnd hooks to
6 # start and stop an AUT, e.g.
7 #
8 # @OnScenarioStart
9 # def hook(context):
10 #     startApplication("addressbook")
11 #
12 # @OnScenarioEnd
13 # def hook(context):
14 #     currentApplicationContext().detach()
15 #
16 # See the section 'Performing Actions During Test Execution Via Hooks' in the Squish
17 # manual for a complete reference of the available API.
18
19 import __builtin__
20
21 # Detach (i.e. potentially terminate) all AUTs at the end of a scenario
22 @OnScenarioEnd
23 def hook(context):
24     source(findFile("scripts", "common.py"))
25     close_application()
26
27     for ctx in applicationContextList():
28         ctx.detach()
29