Robot Framework Integrated Development Environment (RIDE)
tagsetter.py
Go to the documentation of this file.
1
# Copyright 2008-2015 Nokia Networks
2
# Copyright 2016- Robot Framework Foundation
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
# http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15
16
from
robotide.lib.robot.utils
import
py2to3
17
18
from
.visitor
import
SuiteVisitor
19
20
21
@py2to3
22
class
TagSetter
(
SuiteVisitor
):
23
24
def
__init__
(self, add=None, remove=None):
25
self.
add
add = add
26
self.
remove
remove = remove
27
28
def
start_suite
(self, suite):
29
return
bool(self)
30
31
def
visit_test
(self, test):
32
test.tags.add(self.
add
add)
33
test.tags.remove(self.
remove
remove)
34
35
def
visit_keyword
(self, keyword):
36
pass
37
38
def
__nonzero__
(self):
39
return
bool(self.add
or
self.remove)
robotide.lib.robot.model.tagsetter.TagSetter
Definition:
tagsetter.py:22
robotide.lib.robot.model.tagsetter.TagSetter.__init__
def __init__(self, add=None, remove=None)
Definition:
tagsetter.py:24
robotide.lib.robot.model.tagsetter.TagSetter.remove
remove
Definition:
tagsetter.py:26
robotide.lib.robot.model.tagsetter.TagSetter.visit_test
def visit_test(self, test)
Implements traversing through the test and its keywords.
Definition:
tagsetter.py:31
robotide.lib.robot.model.tagsetter.TagSetter.start_suite
def start_suite(self, suite)
Called when suite starts.
Definition:
tagsetter.py:28
robotide.lib.robot.model.tagsetter.TagSetter.add
add
Definition:
tagsetter.py:25
robotide.lib.robot.model.tagsetter.TagSetter.__nonzero__
def __nonzero__(self)
Definition:
tagsetter.py:38
robotide.lib.robot.model.tagsetter.TagSetter.visit_keyword
def visit_keyword(self, keyword)
Implements traversing through the keyword and its child keywords.
Definition:
tagsetter.py:35
robotide.lib.robot.model.visitor.SuiteVisitor
Interface to ease traversing through a test suite structure.
Definition:
visitor.py:75
robotide.lib.robot.utils
Definition:
__init__.py:1
src
robotide
lib
robot
model
tagsetter.py
Generated by
1.9.1