Make assertion message use same var as test

Ensure that the assertion message correctly shows the value used by
the assertion test.
This commit is contained in:
Hugo Duncan 2016-09-12 10:06:35 -04:00
parent 94d46f7960
commit f232e433e6

View File

@ -32,7 +32,7 @@ def to_arguments(args, extra_args):
raise ValueError('Unknown argument "{}".'.format(default_name))
arg_name = default_name or arg.name
assert arg_name not in arguments, 'More than one Argument have same name "{}".'.format(arg.name)
assert arg_name not in arguments, 'More than one Argument have same name "{}".'.format(arg_name)
arguments[arg_name] = arg
return arguments