Skip to content

Commit

Permalink
Merge pull request #264 from iivanou/is_skipped_an_issue
Browse files Browse the repository at this point in the history
Make use of is_skipped_an_issue
  • Loading branch information
HardNorth authored Jun 3, 2021
2 parents e501b45 + 651815d commit aafcd11
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ The following parameters are optional:
- :code:`rp_log_batch_size = 20` - size of batch log request
- :code:`rp_ignore_errors = True` - Ignore Report Portal errors (exit otherwise)
- :code:`rp_ignore_attributes = 'xfail' 'usefixture'` - Ignore specified pytest markers
- :code:`rp_is_skipped_an_issue = False` - Treat skipped tests as required investigation. Default is True.
- :code:`rp_hierarchy_dirs = True` - Enables hierarchy for tests directories, default `False`. Doesn't support 'xdist' plugin.
- :code:`rp_hierarchy_module = True` - Enables hierarchy for module, default `True`. Doesn't support 'xdist' plugin.
- :code:`rp_hierarchy_class = True` - Enables hierarchy for class, default `True`. Doesn't support 'xdist' plugin.
Expand Down
4 changes: 3 additions & 1 deletion pytest_reportportal/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def __init__(self, pytest_config):
self.pconfig = pytest_config

self.rp_endpoint = self.pconfig.getini('rp_endpoint')
self.rp_ignore_errors = bool(self.pconfig.getini('rp_ignore_errors'))
self.rp_ignore_errors = self.pconfig.getini('rp_ignore_errors')
self.rp_ignore_attributes = self.pconfig.getini('rp_ignore_attributes')
self.rp_is_skipped_an_issue = self.pconfig.getini(
'rp_is_skipped_an_issue')
self.rp_launch = self.pconfig.option.rp_launch or self.pconfig.getini(
'rp_launch')
self.rp_launch_id = (self.pconfig.option.rp_launch_id or
Expand Down
1 change: 1 addition & 0 deletions pytest_reportportal/config.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class AgentConfig:
rp_endpoint: Text = ...
rp_ignore_errors: bool = ...
rp_ignore_attributes: Optional[List] = ...
rp_is_skipped_an_issue: bool = ...
rp_launch: Text = ...
rp_launch_id: Optional[Text] = ...
rp_launch_attributes: Optional[List] = ...
Expand Down
7 changes: 7 additions & 0 deletions pytest_reportportal/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def pytest_sessionstart(session):
endpoint=config._reporter_config.rp_endpoint,
uuid=config._reporter_config.rp_uuid,
log_batch_size=config._reporter_config.rp_log_batch_size,
is_skipped_an_issue=config._reporter_config.
rp_is_skipped_an_issue,
ignore_errors=config._reporter_config.rp_ignore_errors,
custom_launch=config._reporter_config.rp_launch_id,
ignored_attributes=config._reporter_config.
Expand Down Expand Up @@ -314,6 +316,11 @@ def pytest_addoption(parser):
'rp_ignore_attributes',
type='args',
help='Ignore specified pytest markers, i.e parametrize')
parser.addini(
'rp_is_skipped_an_issue',
default=True,
type='bool',
help='Treat skipped tests as required investigation')
parser.addini(
'rp_hierarchy_dirs_level',
default=0,
Expand Down
4 changes: 3 additions & 1 deletion pytest_reportportal/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ def init_service(self,
log_batch_size,
ignore_errors,
ignored_attributes,
verify_ssl=True,
custom_launch=None,
is_skipped_an_issue=True,
verify_ssl=True,
parent_item_id=None,
retries=0):
"""Update self.rp with the instance of the ReportPortalService."""
Expand All @@ -148,6 +149,7 @@ def init_service(self,
endpoint=endpoint,
project=project,
token=uuid,
is_skipped_an_issue=is_skipped_an_issue,
log_batch_size=log_batch_size,
retries=retries,
verify_ssl=verify_ssl,
Expand Down

0 comments on commit aafcd11

Please sign in to comment.