Skip to content

Commit 943c464

Browse files
authored
Merge pull request #23 from krasoffski/traceback
Enhance traceback printing and readme file.
2 parents c05996c + bf1a539 commit 943c464

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

README.rst

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Example of :code:`pytest.ini`:
5050
rp_launch_description = 'Smoke test'
5151
rp_ignore_errors = True
5252
53-
The following parapmeters are optional:
53+
The following parameters are optional:
5454

55-
- :code:`rp_launch = AnyLaunchName` - launch name (could be overriden
55+
- :code:`rp_launch = AnyLaunchName` - launch name (could be overridden
5656
by pytest --rp-launch option, default value is 'Pytest Launch')
5757
- :code:`rp_launch_tags = 'PyTest' 'Smoke'` - list of tags
5858
- :code:`rp_launch_description = 'Smoke test'` - launch description
@@ -138,6 +138,27 @@ To run test with Report Portal you can specify name of :code:`launch`:
138138
py.test ./tests --rp-launch AnyLaunchName
139139
140140
141+
Troubleshooting
142+
~~~~~~~~~
143+
144+
In case you have connectivity issues (or similar problems) with Report Portal,
145+
it is possible to ignore exception raised by :code:`pytest_reportportal` plugin.
146+
For this, please, add following option to :code:`pytest.ini` configuration file:
147+
148+
.. code-block:: text
149+
150+
[pytest]
151+
...
152+
rp_ignore_errors = True
153+
154+
155+
Or temporary disable :code:`pytest_reportportal` plugin with command like:
156+
157+
.. code-block:: bash
158+
159+
py.test -p no:pytest_reportportal ./tests
160+
161+
141162
Copyright Notice
142163
----------------
143164

pytest_reportportal/service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import sys
23
import traceback
34
from time import time
45

@@ -61,6 +62,7 @@ def _stop_if_neccessary(self):
6162
try:
6263
exc, msg, tb = self._errors.get(False)
6364
traceback.print_exception(exc, msg, tb)
65+
sys.stderr.flush()
6466
if not self.ignore_errors:
6567
pytest.exit(msg)
6668
except queue.Empty:

0 commit comments

Comments
 (0)