From d8c3607daa6673f3d30ae84d0a3b46f156e81104 Mon Sep 17 00:00:00 2001 From: Johnny Cochrane Date: Sat, 1 Dec 2018 22:54:29 -0800 Subject: [PATCH] implement pytest.mark.parametrize --- tests/test_datastructures.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_datastructures.py b/tests/test_datastructures.py index c21f30df9..c4b0c78fb 100644 --- a/tests/test_datastructures.py +++ b/tests/test_datastructures.py @@ -1068,15 +1068,16 @@ def test_bytes_proper_sentinel(self): assert idx < 2 assert idx == 1 - def test_proxy_can_access_stream_attrs(self): + @pytest.mark.parametrize( + "attributes", ("writable", "readable", "seekable") + ) + def test_proxy_can_access_stream_attrs(self, attributes): # make sure the file object has the bellow attributes as described in # https://github.com/pallets/werkzeug/issues/1344 from tempfile import SpooledTemporaryFile file_storage = self.storage_class(stream=SpooledTemporaryFile()) - assert hasattr(file_storage, "writeable") - assert hasattr(file_storage, "readable") - assert hasattr(file_storage, "seekable") + assert hasattr(file_storage, attributes) @pytest.mark.parametrize(