9
9
"version, expected" ,
10
10
[
11
11
(
12
- 11 ,
13
- "Old thing is deprecated and will be removed in Pillow 11 "
14
- r"\(2024 -10-15\)\. Use new thing instead\." ,
12
+ 12 ,
13
+ "Old thing is deprecated and will be removed in Pillow 12 "
14
+ r"\(2025 -10-15\)\. Use new thing instead\." ,
15
15
),
16
16
(
17
17
None ,
@@ -54,18 +54,18 @@ def test_old_version(deprecated: str, plural: bool, expected: str) -> None:
54
54
55
55
def test_plural () -> None :
56
56
expected = (
57
- r"Old things are deprecated and will be removed in Pillow 11 \(2024 -10-15\)\. "
57
+ r"Old things are deprecated and will be removed in Pillow 12 \(2025 -10-15\)\. "
58
58
r"Use new thing instead\."
59
59
)
60
60
with pytest .warns (DeprecationWarning , match = expected ):
61
- _deprecate .deprecate ("Old things" , 11 , "new thing" , plural = True )
61
+ _deprecate .deprecate ("Old things" , 12 , "new thing" , plural = True )
62
62
63
63
64
64
def test_replacement_and_action () -> None :
65
65
expected = "Use only one of 'replacement' and 'action'"
66
66
with pytest .raises (ValueError , match = expected ):
67
67
_deprecate .deprecate (
68
- "Old thing" , 11 , replacement = "new thing" , action = "Upgrade to new thing"
68
+ "Old thing" , 12 , replacement = "new thing" , action = "Upgrade to new thing"
69
69
)
70
70
71
71
@@ -78,16 +78,16 @@ def test_replacement_and_action() -> None:
78
78
)
79
79
def test_action (action : str ) -> None :
80
80
expected = (
81
- r"Old thing is deprecated and will be removed in Pillow 11 \(2024 -10-15\)\. "
81
+ r"Old thing is deprecated and will be removed in Pillow 12 \(2025 -10-15\)\. "
82
82
r"Upgrade to new thing\."
83
83
)
84
84
with pytest .warns (DeprecationWarning , match = expected ):
85
- _deprecate .deprecate ("Old thing" , 11 , action = action )
85
+ _deprecate .deprecate ("Old thing" , 12 , action = action )
86
86
87
87
88
88
def test_no_replacement_or_action () -> None :
89
89
expected = (
90
- r"Old thing is deprecated and will be removed in Pillow 11 \(2024 -10-15\)"
90
+ r"Old thing is deprecated and will be removed in Pillow 12 \(2025 -10-15\)"
91
91
)
92
92
with pytest .warns (DeprecationWarning , match = expected ):
93
- _deprecate .deprecate ("Old thing" , 11 )
93
+ _deprecate .deprecate ("Old thing" , 12 )
0 commit comments