GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Slightly simplify and clarify instrumented code · gitpython-developers/GitPython@a0f8425

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • test_git.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/test_git.py‎

Copy file name to clipboardExpand all lines: test/test_git.py
+5-8Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -763,16 +763,13 @@ def test_handle_process_output(self):
763763
from git.cmd import handle_process_output, safer_popen
764764

765765
expected_line_count = 5002
766-
line_counts = [None, 0, 0]
767-
lines = [None, [], []]
766+
actual_lines = [None, [], []]
768767

769768
def stdout_handler(line):
770-
line_counts[1] += 1
771-
lines[1].append(line)
769+
actual_lines[1].append(line)
772770

773771
def stderr_handler(line):
774-
line_counts[2] += 1
775-
lines[2].append(line)
772+
actual_lines[2].append(line)
776773

777774
cmdline = [
778775
sys.executable,
@@ -789,8 +786,8 @@ def stderr_handler(line):
789786

790787
handle_process_output(proc, stdout_handler, stderr_handler, finalize_process)
791788

792-
self.assertEqual(line_counts[1], expected_line_count, repr(lines[1]))
793-
self.assertEqual(line_counts[2], expected_line_count, repr(lines[2]))
789+
self.assertEqual(len(actual_lines[1]), expected_line_count, repr(actual_lines[1]))
790+
self.assertEqual(len(actual_lines[2]), expected_line_count, repr(actual_lines[2]))
794791

795792
def test_execute_kwargs_set_agrees_with_method(self):
796793
parameter_names = inspect.signature(cmd.Git.execute).parameters.keys()

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.