◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
2 changes: 1 addition & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version = 1

test_patterns = [
'git/test/**/test_*.py'
]

exclude_patterns = [
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
git/test/fixtures/* eol=lf
init-tests-after-clone.sh
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
git config --global user.name "Travis Runner"
# If we rewrite the user's config by accident, we will mess it up
# and cause subsequent tests to fail
cat git/test/fixtures/.gitconfig >> ~/.gitconfig
- name: Lint with flake8
run: |
set -x
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ script:
# Make sure we limit open handles to see if we are leaking them
- ulimit -n 128
- ulimit -n
- coverage run --omit="git/test/*" -m unittest --buffer
- coverage report
- if [ "$TRAVIS_PYTHON_VERSION" == '3.5' ]; then cd doc && make html; fi
- if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then flake8 --ignore=W293,E265,E266,W503,W504,E731; fi
Expand Down
5 changes: 1 addition & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ include AUTHORS
include CONTRIBUTING.md
include README.md
include requirements.txt
include test-requirements.txt

recursive-include doc *

graft git/test/fixtures
graft git/test/performance

global-exclude __pycache__ *.pyc
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,26 @@ index f2233fbf40f3f69309ce5cc714e99fcbdcd33ec3..a88a777df3909a61be97f1a7b1194dad
@@ -1 +1 @@
-Subproject commit f2233fbf40f3f69309ce5cc714e99fcbdcd33ec3
+Subproject commit a88a777df3909a61be97f1a7b1194dad6de25702-dirty
diff --git a/git/test/fixtures/diff_patch_binary b/git/test/fixtures/diff_patch_binary
new file mode 100644
index 0000000000000000000000000000000000000000..c92ccd6ebc92a871d38ad7cb8a48bcdb1a5dbc33
--- /dev/null
+++ b/git/test/fixtures/diff_patch_binary
@@ -0,0 +1,3 @@
+diff --git a/rps b/rps
+index f4567df37451b230b1381b1bc9c2bcad76e08a3c..736bd596a36924d30b480942e9475ce0d734fa0d 100755
+Binary files a/rps and b/rps differ
diff --git a/git/test/fixtures/diff_raw_binary b/git/test/fixtures/diff_raw_binary
new file mode 100644
index 0000000000000000000000000000000000000000..d4673fa41ee8413384167fc7b9f25e4daf18a53a
--- /dev/null
+++ b/git/test/fixtures/diff_raw_binary
@@ -0,0 +1 @@
+:100755 100755 f4567df37451b230b1381b1bc9c2bcad76e08a3c 736bd596a36924d30b480942e9475ce0d734fa0d M rps
diff --git a/git/test/test_diff.py b/git/test/test_diff.py
index ce0f64f2261bd8de063233108caac1f26742c1fd..4de26f8884fd048ac7f10007f2bf7c7fa3fa60f4 100644
--- a/git/test/test_diff.py
+++ b/git/test/test_diff.py
@@ -65,6 +65,21 @@ class TestDiff(TestBase):
assert diff.rename_to == 'that'
assert len(list(diffs.iter_change_type('R'))) == 1
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion git/test/lib/helper.py → test/lib/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

ospd = osp.dirname

GIT_REPO = os.environ.get("GIT_PYTHON_TEST_GIT_REPO_BASE", ospd(ospd(ospd(ospd(__file__)))))
GIT_DAEMON_PORT = os.environ.get("GIT_PYTHON_TEST_GIT_DAEMON_PORT", "19418")

__all__ = (
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion git/test/performance/lib.py → test/performance/lib.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
GitCmdObjectDB,
GitDB
)
from git.test.lib import (
TestBase
)
from git.util import rmtree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
from time import time

from git.test.lib import (
with_rw_repo
)
from git.util import bin_to_hex
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_actor.py → test/test_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php

from git.test.lib import TestBase
from git import Actor


Expand Down
2 changes: 1 addition & 1 deletion git/test/test_base.py → test/test_base.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
)
from git.compat import is_win
from git.objects.util import get_object_type_by_name
from git.test.lib import (
TestBase,
with_rw_repo,
with_rw_and_rw_remote_repo
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_blob.py → test/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php

from git.test.lib import TestBase
from git import Blob


Expand Down
4 changes: 2 additions & 2 deletions git/test/test_commit.py → test/test_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
from git import Repo
from git.objects.util import tzoffset, utc
from git.repo.fun import touch
from git.test.lib import (
TestBase,
with_rw_repo,
fixture_path,
StringProcessAdapter
)
from git.test.lib import with_rw_directory
from gitdb import IStream

import os.path as osp
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_db.py → test/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from git.db import GitCmdObjectDB
from git.exc import BadObject
from git.test.lib import TestBase
from git.util import bin_to_hex

import os.path as osp
Expand Down
4 changes: 2 additions & 2 deletions git/test/test_diff.py → test/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
Submodule,
)
from git.cmd import Git
from git.test.lib import (
TestBase,
StringProcessAdapter,
fixture,
)
from git.test.lib import with_rw_directory

import os.path as osp

Expand Down
4 changes: 2 additions & 2 deletions git/test/test_docs.py → test/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import os

from git.test.lib import TestBase
from git.test.lib.helper import with_rw_directory

import os.path

Expand Down
2 changes: 1 addition & 1 deletion git/test/test_exc.py → test/test_exc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
HookExecutionError,
RepositoryDirtyError,
)
from git.test.lib import TestBase

import itertools as itt

Expand Down
2 changes: 1 addition & 1 deletion git/test/test_fun.py → test/test_fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from git.repo.fun import (
find_worktree_git_dir
)
from git.test.lib import (
TestBase,
with_rw_repo,
with_rw_directory
Expand Down
4 changes: 2 additions & 2 deletions git/test/test_index.py → test/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
IndexEntry
)
from git.objects import Blob
from git.test.lib import (
TestBase,
fixture_path,
fixture,
with_rw_repo
)
from git.test.lib import with_rw_directory
from git.util import Actor, rmtree
from git.util import HIDE_WINDOWS_KNOWN_ERRORS, hex_to_bin
from gitdb.base import IStream
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_refs.py → test/test_refs.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
RefLog
)
from git.objects.tag import TagObject
from git.test.lib import (
TestBase,
with_rw_repo
)
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_remote.py → test/test_remote.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
GitCommandError
)
from git.cmd import Git
from git.test.lib import (
TestBase,
with_rw_repo,
with_rw_and_rw_remote_repo,
Expand Down
6 changes: 3 additions & 3 deletions git/test/test_repo.py → test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
BadObject,
)
from git.repo.fun import touch
from git.test.lib import (
TestBase,
with_rw_repo,
fixture
)
from git.util import HIDE_WINDOWS_KNOWN_ERRORS, cygpath
from git.test.lib import with_rw_directory
from git.util import join_path_native, rmtree, rmfile, bin_to_hex

import os.path as osp
Expand Down Expand Up @@ -865,7 +865,7 @@ def last_commit(repo, rev, path):
for _ in range(64):
for repo_type in (GitCmdObjectDB, GitDB):
repo = Repo(self.rorepo.working_tree_dir, odbt=repo_type)
last_commit(repo, 'master', 'git/test/test_base.py')
# end for each repository type
# end for each iteration

Expand Down
2 changes: 1 addition & 1 deletion git/test/test_stats.py → test/test_stats.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php

from git.test.lib import (
TestBase,
fixture
)
Expand Down
4 changes: 2 additions & 2 deletions git/test/test_submodule.py → test/test_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
find_submodule_git_dir,
touch
)
from git.test.lib import (
TestBase,
with_rw_repo
)
from git.test.lib import with_rw_directory
from git.util import HIDE_WINDOWS_KNOWN_ERRORS
from git.util import to_native_path_linux, join_path_native
import os.path as osp
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_tree.py → test/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Tree,
Blob
)
from git.test.lib import TestBase
from git.util import HIDE_WINDOWS_KNOWN_ERRORS

import os.path as osp
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_util.py → test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
parse_date,
tzoffset,
from_timestamp)
from git.test.lib import TestBase
from git.util import (
LockFile,
BlockingLockFile,
Toggle all file notes Toggle all file annotations