File: 0003_python3.14.patch

package info (click to toggle)
python-wilderness 0.1.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 396 kB
  • sloc: python: 2,176; makefile: 152; sh: 9
file content (18 lines) | stat: -rw-r--r-- 811 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Fix testsuite for Python 3.14
Bug-Debian: https://bugs.debian.org/1127531
Forwarded: https://github.com/GjjvdBurg/wilderness/pull/16
Author: Alexandre Detiste <alexandre.detiste@gmail.com>
--- a/tests/test_formatter.py
+++ b/tests/test_formatter.py
@@ -79,9 +79,10 @@
         thehelp = parser.format_help()
 
         minor = sys.version_info.minor
+        synopsis = "[-p | --plain | -j | --json]" if minor < 14 else "[-h] [-p | -j]"
         optstr = "options" if minor >= 10 else "optional arguments"
         exp = (
-            f"usage: test [-p | --plain | -j | --json]\n\n{optstr}:\n"
+            f"usage: test {synopsis}\n\n{optstr}:\n"
             "  -h, --help   show this help message and exit\n"
             "  -p, --plain  plain help\n"
             "  -j, --json   json help\n"