Skip to content

Commit

Permalink
Add test docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
asford committed Apr 9, 2022
1 parent 37bc6ef commit 1664c1b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_make.py
Expand Up @@ -1738,6 +1738,12 @@ class TestInitAlias:
"""

def test_default_and_specify(self):
"""
alias is present on the Attributes returned from attr.fields.
If left unspecified, it defaults to standard private-attribute handling.
If specified, it passes through the explicit alias.
"""

# alias is None by default on _CountingAttr
default_counting = attr.ib()
Expand Down Expand Up @@ -1796,6 +1802,10 @@ class Cases:
assert example.__dunder_override__ == 6

def test_evolve(self):
"""
attr.evolve uses Attribute.alias to determine parameter names.
"""

@attr.s
class EvolveCase:
_override = attr.ib(alias="_override")
Expand Down

0 comments on commit 1664c1b

Please sign in to comment.