File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ The following parameters are optional:
5656- :code: `rp_launch = AnyLaunchName ` - launch name (could be overridden
5757 by pytest --rp-launch option, default value is 'Pytest Launch')
5858- :code: `rp_launch_tags = 'PyTest' 'Smoke' ` - list of tags
59- - :code: `rp_launch_description = 'Smoke test' ` - launch description
59+ - :code: `rp_launch_description = 'Smoke test' ` - launch description (could be overridden
60+ by pytest --rp-launch-description option, default value is '')
61+
6062- :code: `rp_log_batch_size = 20 ` - size of batch log request
6163- :code: `rp_ignore_errors = True ` - Ignore Report Portal errors (exit otherwise)
6264- :code: `rp_ignore_tags = 'xfail' 'usefixture' ` - Ignore specified pytest markers
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def pytest_sessionstart(session):
3030 PyTestService .start_launch (
3131 session .config .option .rp_launch ,
3232 tags = session .config .getini ('rp_launch_tags' ),
33- description = session .config .getini ( ' rp_launch_description' ) ,
33+ description = session .config .option . rp_launch_description ,
3434 )
3535
3636
@@ -46,6 +46,8 @@ def pytest_sessionfinish(session):
4646def pytest_configure (config ):
4747 if not config .option .rp_launch :
4848 config .option .rp_launch = config .getini ('rp_launch' )
49+ if not config .option .rp_launch_description :
50+ config .option .rp_launch_description = config .getini ('rp_launch_description' )
4951
5052 if config .pluginmanager .hasplugin ('xdist' ):
5153 raise Exception (
@@ -86,6 +88,11 @@ def pytest_addoption(parser):
8688 action = 'store' ,
8789 dest = 'rp_launch' ,
8890 help = 'Launch name (overrides rp_launch config option)' )
91+ group .addoption (
92+ '--rp-launch-description' ,
93+ action = 'store' ,
94+ dest = 'rp_launch_description' ,
95+ help = 'Launch description (overrides rp_launch_description config option)' )
8996
9097 if PYTEST_HAS_LOGGING_PLUGIN :
9198 group .addoption (
You can’t perform that action at this time.
0 commit comments