mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-29497: Do not provide sys.argv[1:] to behave since they are already provided
_jb_django_behave.py: "scenario_n_options" already contains all options and arguments behave needs (see how this method is called). No need to duplicate them using "sys.argv[1:]" +tests added
This commit is contained in:
@@ -27,8 +27,7 @@ def run_as_django_behave(formatter_name, feature_names, scenario_n_options):
|
||||
|
||||
if apps.is_installed("behave_django"):
|
||||
base = sys.argv[0]
|
||||
rest = sys.argv[1:]
|
||||
sys.argv = [base] + rest + ["behave", "-f{0}".format(formatter_name)] + feature_names + scenario_n_options
|
||||
sys.argv = [base] + ["behave", "-f{0}".format(formatter_name)] + feature_names + scenario_n_options
|
||||
print("manage.py " + " ".join(sys.argv[1:]))
|
||||
ManagementUtility().execute()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user