mirror of
https://github.com/samba-team/samba.git
synced 2025-01-18 06:04:06 +03:00
selftest: fix mutable default arguments
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
parent
f582caad83
commit
4717a58f6c
@ -66,13 +66,15 @@ def valgrindify(cmdline):
|
||||
return valgrind + " " + cmdline
|
||||
|
||||
|
||||
def plantestsuite(name, env, cmd, environ={}):
|
||||
def plantestsuite(name, env, cmd, environ=None):
|
||||
"""Plan a test suite.
|
||||
|
||||
:param name: Testsuite name
|
||||
:param env: Environment to run the testsuite in
|
||||
:param cmdline: Command line to run
|
||||
"""
|
||||
if environ is None:
|
||||
environ = {}
|
||||
print("-- TEST --")
|
||||
if env == "none":
|
||||
fullname = name
|
||||
@ -149,7 +151,13 @@ def planperltestsuite(name, path):
|
||||
skiptestsuite(name, "Test::More not available")
|
||||
|
||||
|
||||
def planpythontestsuite(env, module, name=None, extra_path=[], environ={}, extra_args=[]):
|
||||
def planpythontestsuite(env, module, name=None, extra_path=None, environ=None, extra_args=None):
|
||||
if extra_path is None:
|
||||
extra_path = []
|
||||
if environ is None:
|
||||
environ = {}
|
||||
if extra_args is None:
|
||||
extra_args = []
|
||||
environ = dict(environ)
|
||||
py_path = list(extra_path)
|
||||
if py_path is not None:
|
||||
@ -192,7 +200,9 @@ smbtorture4_options = [
|
||||
] + get_env_torture_options()
|
||||
|
||||
|
||||
def plansmbtorture4testsuite(name, env, options, target, modname=None, environ={}):
|
||||
def plansmbtorture4testsuite(name, env, options, target, modname=None, environ=None):
|
||||
if environ is None:
|
||||
environ = {}
|
||||
if modname is None:
|
||||
modname = "samba4.%s" % name
|
||||
if isinstance(options, list):
|
||||
|
Loading…
x
Reference in New Issue
Block a user