mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 11:35:52 +03:00
Parametrized test
This commit is contained in:
parent
7597a9fbfd
commit
750bbc7256
|
@ -609,30 +609,33 @@ class TestImage:
|
|||
|
||||
assert not fp.closed
|
||||
|
||||
def test_pillow_version(self):
|
||||
@pytest.mark.parametrize(
|
||||
"test_module", [PIL, Image],
|
||||
)
|
||||
def test_pillow_version(self, test_module):
|
||||
with pytest.warns(DeprecationWarning):
|
||||
assert PIL.PILLOW_VERSION == PIL.__version__
|
||||
assert test_module.PILLOW_VERSION == PIL.__version__
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
str(PIL.PILLOW_VERSION)
|
||||
str(test_module.PILLOW_VERSION)
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
assert int(PIL.PILLOW_VERSION[0]) >= 7
|
||||
assert int(test_module.PILLOW_VERSION[0]) >= 7
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
assert PIL.PILLOW_VERSION < "9.9.0"
|
||||
assert test_module.PILLOW_VERSION < "9.9.0"
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
assert PIL.PILLOW_VERSION <= "9.9.0"
|
||||
assert test_module.PILLOW_VERSION <= "9.9.0"
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
assert PIL.PILLOW_VERSION != "7.0.0"
|
||||
assert test_module.PILLOW_VERSION != "7.0.0"
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
assert PIL.PILLOW_VERSION >= "7.0.0"
|
||||
assert test_module.PILLOW_VERSION >= "7.0.0"
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
assert PIL.PILLOW_VERSION > "7.0.0"
|
||||
assert test_module.PILLOW_VERSION > "7.0.0"
|
||||
|
||||
def test_overrun(self):
|
||||
for file in [
|
||||
|
|
Loading…
Reference in New Issue
Block a user