Skip to content

Commit 651815d

Browse files
committed
Make use of is_skipped_an_issue
1 parent e501b45 commit 651815d

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ The following parameters are optional:
103103
- :code:`rp_log_batch_size = 20` - size of batch log request
104104
- :code:`rp_ignore_errors = True` - Ignore Report Portal errors (exit otherwise)
105105
- :code:`rp_ignore_attributes = 'xfail' 'usefixture'` - Ignore specified pytest markers
106+
- :code:`rp_is_skipped_an_issue = False` - Treat skipped tests as required investigation. Default is True.
106107
- :code:`rp_hierarchy_dirs = True` - Enables hierarchy for tests directories, default `False`. Doesn't support 'xdist' plugin.
107108
- :code:`rp_hierarchy_module = True` - Enables hierarchy for module, default `True`. Doesn't support 'xdist' plugin.
108109
- :code:`rp_hierarchy_class = True` - Enables hierarchy for class, default `True`. Doesn't support 'xdist' plugin.

pytest_reportportal/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ def __init__(self, pytest_config):
1919
self.pconfig = pytest_config
2020

2121
self.rp_endpoint = self.pconfig.getini('rp_endpoint')
22-
self.rp_ignore_errors = bool(self.pconfig.getini('rp_ignore_errors'))
22+
self.rp_ignore_errors = self.pconfig.getini('rp_ignore_errors')
2323
self.rp_ignore_attributes = self.pconfig.getini('rp_ignore_attributes')
24+
self.rp_is_skipped_an_issue = self.pconfig.getini(
25+
'rp_is_skipped_an_issue')
2426
self.rp_launch = self.pconfig.option.rp_launch or self.pconfig.getini(
2527
'rp_launch')
2628
self.rp_launch_id = (self.pconfig.option.rp_launch_id or

pytest_reportportal/config.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class AgentConfig:
77
rp_endpoint: Text = ...
88
rp_ignore_errors: bool = ...
99
rp_ignore_attributes: Optional[List] = ...
10+
rp_is_skipped_an_issue: bool = ...
1011
rp_launch: Text = ...
1112
rp_launch_id: Optional[Text] = ...
1213
rp_launch_attributes: Optional[List] = ...

pytest_reportportal/plugin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def pytest_sessionstart(session):
9393
endpoint=config._reporter_config.rp_endpoint,
9494
uuid=config._reporter_config.rp_uuid,
9595
log_batch_size=config._reporter_config.rp_log_batch_size,
96+
is_skipped_an_issue=config._reporter_config.
97+
rp_is_skipped_an_issue,
9698
ignore_errors=config._reporter_config.rp_ignore_errors,
9799
custom_launch=config._reporter_config.rp_launch_id,
98100
ignored_attributes=config._reporter_config.
@@ -314,6 +316,11 @@ def pytest_addoption(parser):
314316
'rp_ignore_attributes',
315317
type='args',
316318
help='Ignore specified pytest markers, i.e parametrize')
319+
parser.addini(
320+
'rp_is_skipped_an_issue',
321+
default=True,
322+
type='bool',
323+
help='Treat skipped tests as required investigation')
317324
parser.addini(
318325
'rp_hierarchy_dirs_level',
319326
default=0,

pytest_reportportal/service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ def init_service(self,
128128
log_batch_size,
129129
ignore_errors,
130130
ignored_attributes,
131-
verify_ssl=True,
132131
custom_launch=None,
132+
is_skipped_an_issue=True,
133+
verify_ssl=True,
133134
parent_item_id=None,
134135
retries=0):
135136
"""Update self.rp with the instance of the ReportPortalService."""
@@ -148,6 +149,7 @@ def init_service(self,
148149
endpoint=endpoint,
149150
project=project,
150151
token=uuid,
152+
is_skipped_an_issue=is_skipped_an_issue,
151153
log_batch_size=log_batch_size,
152154
retries=retries,
153155
verify_ssl=verify_ssl,

0 commit comments

Comments
 (0)