-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from offbyone/fix-iterator-types
Address #207 by using `Matcher[Any]`
- Loading branch information
Showing
7 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
``has_properties`` now returns ``Matcher[Any]`` type, which addresses type checking errors when nested as a matcher. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
- case: valid_has_items_has_properties | ||
skip: platform.python_implementation() == "PyPy" | ||
main: | | ||
from dataclasses import dataclass | ||
from hamcrest import assert_that, has_items, has_properties | ||
@dataclass | ||
class Example: | ||
name: str | ||
items = [Example("dave"), Example("wave")] | ||
a = assert_that(items, has_items(has_properties(name="dave"))) | ||
- case: valid_has_item_has_properties | ||
skip: platform.python_implementation() == "PyPy" | ||
main: | | ||
from dataclasses import dataclass | ||
from hamcrest import assert_that, has_item, has_properties | ||
@dataclass | ||
class Example: | ||
name: str | ||
items = [Example("dave"), Example("wave")] | ||
matcher = has_item(has_properties(name="dave")) | ||
a = assert_that(items, matcher) |