11"""Test constants from :mod:`xmlsec.constants` module."""
22
3- from hypothesis import given , strategies
3+ import pytest
44
55import xmlsec
66
@@ -18,25 +18,25 @@ def _constants(typename):
1818 )
1919
2020
21- @given ( transform = strategies . sampled_from ( _constants ('__Transform' )) )
21+ @pytest . mark . parametrize ( 'transform' , _constants ('__Transform' ), ids = repr )
2222def test_transform_str (transform ):
2323 """Test string representation of ``xmlsec.constants.__Transform``."""
2424 assert str (transform ) == '{}, {}' .format (transform .name , transform .href )
2525
2626
27- @given ( transform = strategies . sampled_from ( _constants ('__Transform' )) )
27+ @pytest . mark . parametrize ( 'transform' , _constants ('__Transform' ), ids = repr )
2828def test_transform_repr (transform ):
2929 """Test raw string representation of ``xmlsec.constants.__Transform``."""
3030 assert repr (transform ) == '__Transform({!r}, {!r}, {})' .format (transform .name , transform .href , transform .usage )
3131
3232
33- @given ( keydata = strategies . sampled_from ( _constants ('__KeyData' )) )
33+ @pytest . mark . parametrize ( 'keydata' , _constants ('__KeyData' ), ids = repr )
3434def test_keydata_str (keydata ):
3535 """Test string representation of ``xmlsec.constants.__KeyData``."""
3636 assert str (keydata ) == '{}, {}' .format (keydata .name , keydata .href )
3737
3838
39- @given ( keydata = strategies . sampled_from ( _constants ('__KeyData' )) )
39+ @pytest . mark . parametrize ( 'keydata' , _constants ('__KeyData' ), ids = repr )
4040def test_keydata_repr (keydata ):
4141 """Test raw string representation of ``xmlsec.constants.__KeyData``."""
4242 assert repr (keydata ) == '__KeyData({!r}, {!r})' .format (keydata .name , keydata .href )
0 commit comments