Skip to content

Commit 0662251

Browse files
committed
Fix warning handling in CLI tests to capture DeprecationWarnings consistently
1 parent bde0d25 commit 0662251

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
def test_cli_folder(tmp_path):
1010
runner = CliRunner()
11-
with warnings.catch_warnings(record=True, category=DeprecationWarning):
11+
12+
with warnings.catch_warnings(record=True):
13+
warnings.simplefilter("always", DeprecationWarning)
14+
15+
# Your code that may trigger a DeprecationWarning
1216
result = runner.invoke(
1317
cli,
1418
[

0 commit comments

Comments
 (0)