Skip to content

Commit

Permalink
replace testAttrsNewPackage with testAttrsOldPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst committed May 18, 2023
1 parent 64b3d1a commit e5d8da0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test-data/unit/check-plugin-attrs.test
Original file line number Diff line number Diff line change
Expand Up @@ -400,20 +400,25 @@ reveal_type(D) # N: Revealed type is "def (b: Any) -> __main__.D"

[builtins fixtures/bool.pyi]

[case testAttrsNewPackage]
import attrs
@attrs.define
[case testAttrsOldPackage]
import attr
@attr.s(auto_attribs=True)
class A:
a: int = attrs.field()
a: int = attr.ib()
b: bool

@attrs.frozen
@attr.s(auto_attribs=True, frozen=True)
class B:
a: bool
b: int

@attr.s
class C:
a = attr.ib(type=int)

reveal_type(A) # N: Revealed type is "def (a: builtins.int, b: builtins.bool) -> __main__.A"
reveal_type(B) # N: Revealed type is "def (a: builtins.bool, b: builtins.int) -> __main__.B"
reveal_type(C) # N: Revealed type is "def (a: builtins.int) -> __main__.C"

[builtins fixtures/bool.pyi]

Expand Down

0 comments on commit e5d8da0

Please sign in to comment.