Skip to content

Commit f527a68

Browse files
committed
Avoid multi-threaded test runs when using nosetests
1 parent 3988f07 commit f527a68

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

seleniumbase/plugins/base_plugin.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import os
9+
import sys
910
import time
1011
from nose.plugins import Plugin
1112
from nose.exc import SkipTest
@@ -55,6 +56,16 @@ def options(self, parser, env):
5556
dest='show_report',
5657
default=False,
5758
help="If true when using report, will display it after tests run.")
59+
found_processes_arg = False
60+
for arg in sys.argv:
61+
if "--processes=" in arg:
62+
found_processes_arg = True
63+
if found_processes_arg:
64+
print("* WARNING: Don't use multi-threading with nosetests! *")
65+
parser.add_option(
66+
'--processes', dest='processes',
67+
default=0,
68+
help="WARNING: Don't use multi-threading with nosetests!")
5869

5970
def configure(self, options, conf):
6071
super(Base, self).configure(options, conf)

0 commit comments

Comments
 (0)