Skip to content

Commit

Permalink
Merge c8a2473 into f8dc15f
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldemarmiesse committed Jul 23, 2019
2 parents f8dc15f + c8a2473 commit 8631cf2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sacred/config/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def construct_arguments(self, args, kwargs, options, bound=False):
self._assert_no_missing_args(args, kwargs, bound)
return args, kwargs

def __unicode__(self):
def __str__(self):
pos_args = self.positional_args
varg = ["*" + self.vararg_name] if self.vararg_name else []
kwargs = ["{}={}".format(n, v.__repr__())
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config/test_signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def test_construct_arguments_for_bound_method():
(bariza, "bariza(a, b, c)")
])
def test_unicode_(func, expected):
assert Signature(func).__unicode__() == expected
assert str(Signature(func)) == expected


@pytest.mark.parametrize('name,func', zip(names, functions))
Expand Down
4 changes: 2 additions & 2 deletions tests/test_config/test_signature_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ def test_construct_arguments_for_bound_method():
(onlykwrgs, "onlykwrgs(**kwargs)")
])
def test_unicode_(func, expected):
assert Signature(func).__unicode__() == expected
assert str(Signature(func)) == expected


def test_unicode_special():
str_signature = "complex_function_name(a=5, b='fo', c=9)"
assert str_signature in Signature(complex_function_name).__unicode__()
assert str_signature in str(Signature(complex_function_name))


@pytest.mark.parametrize('name,func', zip(names, functions))
Expand Down

0 comments on commit 8631cf2

Please sign in to comment.