Skip to content

Commit

Permalink
Add test_fields_converter_is_passed_converter
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jul 7, 2018
1 parent 5ac916d commit 040f2b9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_make.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,20 @@ def test_converter_takes_self(self):

assert i.x == 2

def test_fields_converter_is_passed_converter(self):
"""
attr.fields(C).a.converter is same object as passed converter
"""

def f(value):
return value

@attr.s
class C(object):
a = attr.ib(converter=f)

assert attr.fields(C).a.converter is f


class TestValidate(object):
"""
Expand Down

0 comments on commit 040f2b9

Please sign in to comment.