forked from allure-framework/allure-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlabel.py
More file actions
61 lines (37 loc) · 1.11 KB
/
label.py
File metadata and controls
61 lines (37 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from hamcrest import all_of
from hamcrest import anything
from hamcrest import has_entry, has_item
def has_label(name, value=None):
if value is None:
value = anything()
return has_entry(
"labels",
has_item(
all_of(
has_entry("name", name),
has_entry("value", value)
)
)
)
def has_severity(level):
return has_label("severity", level)
def has_epic(feature):
return has_label("epic", feature)
def has_feature(feature):
return has_label("feature", feature)
def has_story(story):
return has_label("story", story)
def has_tag(tag):
return has_label("tag", tag)
def has_package(package):
return has_label("package", package)
def has_suite(suite):
return has_label("suite", suite)
def has_parent_suite(parent_suite):
return has_label("parentSuite", parent_suite)
def has_sub_suite(sub_suite):
return has_label("subSuite", sub_suite)
def has_allure_id(allure_id):
return has_label("as_id", allure_id)
def has_manual(allure_id):
return has_label("ALLURE_MANUAL", allure_id)