File: 0036-dont-assume-gitrepo.patch

package info (click to toggle)
pagure 5.14.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,008 kB
  • sloc: python: 125,295; javascript: 22,012; makefile: 208; sh: 191
file content (24 lines) | stat: -rw-r--r-- 906 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
Description: Don't assume we're building from a git repo

read_output used git rev-list on the pagure repo
(not a small test repo) as an example of a large output

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no, maybe not-needed

--- a/tests/test_pagure_lib_git.py
+++ b/tests/test_pagure_lib_git.py
@@ -3604,9 +3604,11 @@ index 0000000..60f7480
 
     def test_read_output(self):
         here = os.path.dirname(os.path.realpath(__file__))
-        # This should't block
+        # This shouldn't block when the output is too large
+        # to fit in the buffers all at once
+        # This file is used simply as an example of such large output
         self.assertTrue(
-            pagure.lib.git.read_output(["git", "rev-list", "--all"], here)
+            pagure.lib.git.read_output(["cat", "test_pagure_lib_git.py"], here)
         )
 
     @patch("pagure.utils.get_repo_path")