Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnzZ committed Jan 17, 2024
1 parent 5c83d22 commit 202fa1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,16 @@ def provide(*args, **kwargs):
assert len(results) == 2
assert type(results[0]) == BrowserHtml
assert type(results[1]) == AnyResponse
assert results[0] == results[1].response.html # diff instance due to casting
# diff instance due to casting
assert results[0] == results[1].response.html # type: ignore[union-attr]

results = yield provide({AnyResponse, BrowserResponse, BrowserHtml})
assert len(results) == 3
assert type(results[0]) == BrowserHtml
assert type(results[1]) == BrowserResponse
assert type(results[2]) == AnyResponse
assert results[0] == results[1].html # diff instance due to casting
assert results[0] == results[2].response.html
assert results[0] == results[1].html
assert results[0] == results[2].response.html # type: ignore[union-attr]

# NOTES: This is hard to test in this setup and would result in being empty.
# This will be tested in a spider-setup instead so that HttpResponseProvider
Expand Down

0 comments on commit 202fa1b

Please sign in to comment.