File: do-not-print.patch

package info (click to toggle)
ironic 1%3A32.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 22,992 kB
  • sloc: python: 184,221; sh: 3,917; pascal: 766; xml: 387; makefile: 86
file content (35 lines) | stat: -rw-r--r-- 1,573 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Description: Do not print
 Without this patch, we're getting:
 .
  File "/<<PKGBUILDDIR>>/ironic/tests/unit/api/base.py", line 115, in _request_json
   print(method.upper(), full_path, "WITH", params, "GOT", str(response))
 BlockingIOError: [Errno 11] write could not complete without blocking
 .
 about 60 times (not always the same number of times...).
Author: Thomas Goirand <zigo@debian.org>
Forwarded: not-needed
Last-Update: 2023-10-05

Index: ironic/ironic/tests/unit/api/base.py
===================================================================
--- ironic.orig/ironic/tests/unit/api/base.py
+++ ironic/ironic/tests/unit/api/base.py
@@ -112,7 +112,7 @@ class BaseApiTest(db_base.DbTestCase):
             extra_environ=extra_environ,
             expect_errors=expect_errors
         )
-        print(method.upper(), full_path, "WITH", params, "GOT", str(response))
+#        print(method.upper(), full_path, "WITH", params, "GOT", str(response))
         return response
 
     def put_json(self, path, params, expect_errors=False, headers=None,
@@ -228,7 +228,8 @@ class BaseApiTest(db_base.DbTestCase):
                                 headers=headers,
                                 extra_environ=extra_environ,
                                 expect_errors=expect_errors)
-        print("GET", full_path, "WITH", params, "GOT", str(response))
+        # This breaks unit testing in Debian:
+        #print("GET", full_path, "WITH", params, "GOT", str(response))
         if not expect_errors:
             response = response.json
         return response