File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
8
8
## 0.2.3 - 2022-xx-xx
9
9
10
10
- {pull}` 276 ` fixes ` pytask clean ` when git is not installed. Fixes {issue}` 275 ` .
11
+ - {pull}` 277 ` ignores ` DeprecationWarning ` and ` PendingDeprecationWarning ` by default.
12
+ Previously, they were enabled, but they should be shown when testing the project with
13
+ pytest, not after the execution with pytask.
11
14
12
15
## 0.2.2 - 2022-05-14
13
16
Original file line number Diff line number Diff line change @@ -119,3 +119,19 @@ def task_example():
119
119
assert result .exit_code == ExitCode .OK
120
120
assert ("Warnings" in result .output ) is not add_config
121
121
assert ("warning!!!" in result .output ) is not add_config
122
+
123
+
124
+ @pytest .mark .parametrize ("warning" , ["DeprecationWarning" , "PendingDeprecationWarning" ])
125
+ def test_deprecation_warnings_are_not_captured (tmp_path , runner , warning ):
126
+ source = f"""
127
+ import warnings
128
+
129
+ def task_example():
130
+ warnings.warn("warning!!!", { warning } )
131
+ """
132
+ tmp_path .joinpath ("task_example.py" ).write_text (textwrap .dedent (source ))
133
+ result = runner .invoke (cli , [tmp_path .as_posix ()])
134
+
135
+ assert result .exit_code == ExitCode .OK
136
+ assert "Warnings" not in result .output
137
+ assert "warning!!!" not in result .output
You can’t perform that action at this time.
0 commit comments