From 202fa1bfda65668f4d36c39bf9ec402e3f61cfb8 Mon Sep 17 00:00:00 2001 From: Kevin Lloyd Bernal Date: Wed, 17 Jan 2024 20:38:26 +0800 Subject: [PATCH] fix mypy --- tests/test_providers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_providers.py b/tests/test_providers.py index 89a2abf3..4d8da175 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -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