libgit2 / libgit2/pygit2

test_no_context_lines fails on Big Endian

Open
#812 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.7k
Forks
408
Avg merge
2d 57m
Merged PRs (30d)
7

Description

======================================================================
FAIL: test_no_context_lines (test.test_patch.PatchTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pygit2-0.27.1/test/test_patch.py", line 192, in test_no_context_lines
    self.assertEqual(context_count, 0)
AssertionError: 1 != 0
----------------------------------------------------------------------

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/test_patch.py, especially test_no_context_lines at the traceback location, and reproduce the failure on a big-endian system. Inspect how context_count is obtained and verify the test passes with a zero count while preserving the intended no-context-lines behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.