Skip to content

Commit

Permalink
implement pytest.mark.parametrize
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnny Cochrane committed Dec 2, 2018
1 parent 91471c3 commit d8c3607
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_datastructures.py
Expand Up @@ -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(
Expand Down

0 comments on commit d8c3607

Please sign in to comment.