File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6913,16 +6913,17 @@ def block_ads(self):
6913
6913
self.ad_block()
6914
6914
6915
6915
def _print(self, msg):
6916
- """Same as Python's print(), but won't print during multithreaded runs
6917
- because overlapping print() commands may lead to unexpected output.
6918
- In most cases, the print() command won't print for multithreaded tests,
6919
- but there are some exceptions, and this will take care of those.
6920
- Here's an example of running tests multithreaded: "pytest -n=4".
6916
+ """Same as Python's print(), but also prints during multithreaded runs.
6917
+ Normally, Python's print() command won't print for multithreaded tests.
6918
+ Here's an example of running tests using multithreading: "pytest -n=4".
6919
+ Here's how to print directly from sys without using a print() command:
6921
6920
To force a print during multithreaded tests, use: "sys.stderr.write()".
6922
6921
To print without the new-line character end, use: "sys.stdout.write()".
6923
6922
"""
6924
6923
if not sb_config._multithreaded:
6925
6924
print(msg)
6925
+ else:
6926
+ sys.stderr.write(msg)
6926
6927
6927
6928
def start_tour(self, name=None, interval=0):
6928
6929
self.play_tour(name=name, interval=interval)
You can’t perform that action at this time.
0 commit comments