summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Use git interpret-trailers for trailers propertyKet3r2022-01-071-2/+2
| | | | | | | The whitespace handling and trailer selection isn't very trivial or good documented. It therefore seemed easier and less error prone to just call git to parse the message for the trailers section and remove superfluos whitespaces.
* Add failing unit testPeter Kempter2022-01-071-0/+46
|
* Add raise_if_error() to tutorialSjoerd Langkemper2021-11-131-1/+2
|
* Test raise_if_errorSjoerd Langkemper2021-11-131-0/+6
|
* Test that return value of push is a list-like objectSjoerd Langkemper2021-11-131-1/+4
|
* Revert "Replace wildcard imports with concrete imports"Trym Bremnes2021-10-031-5/+2
| | | | | | | | | | | This reverts commit 53d94b8091b36847bb9e495c76bb5a3ec2a2fdb5. The reason for the revert is that the commit in question introduced a regression where certain modules, functions and classes that were exposed before were no longer exposed. See https://github.com/gitpython-developers/GitPython/pull/1352#issuecomment-932757204 for additional information.
* Replace wildcard imports with concrete importsTrym Bremnes2021-10-011-2/+5
| | | | | | | All `from <module> import *` has now been replaced by `from <module> import X, Y, ...`. Contributes to #1349
* Add a way to force status codes inside AutoInterrupt._terminate, and let ↵sroet2021-09-181-4/+10
| | | | tests use it
* set timeout to a non-zero valuesroet2021-09-181-2/+2
|
* two spaces before commentssroet2021-09-181-1/+1
|
* fetch is also to quick on CI, only test pullsroet2021-09-181-1/+1
|
* make test timeout strictersroet2021-09-181-2/+2
|
* go for pytest.raises and test that the functions runsroet2021-09-181-3/+3
|
* update tests and add a comment about different behaviour of 'push' vs 'fetch'sroet2021-09-181-3/+17
|
* propagate kwargs in do_test_fetchsroet2021-09-181-2/+2
|
* also test a call to 'push' with 10s timeoutsroet2021-09-181-1/+1
|
* add test timeout with the old 10 s timeoutsroet2021-09-181-2/+2
|
* Update test_util.pyEric Wieser2021-08-041-1/+4
|
* Try a better testEric Wieser2021-08-041-3/+18
|
* Fix testEric Wieser2021-08-031-9/+9
|
* Update test_refs.pyDominic2021-07-311-3/+7
|
* Added support of spaces for clone multi_optionsIgor Lakhtenkov2021-07-271-1/+3
|
* Rmv old py2.7 __future__ importsYobmod2021-07-195-9/+0
|
* rmv python 3.5 checks from testsYobmod2021-07-198-24/+15
|
* Merge branch 'main' into Yobmod/mainSebastian Thiel2021-07-011-0/+66
|\
| * Added clone multi_options to SubmoduleIgor Lakhtenkov2021-06-301-0/+66
| |
* | Type Traversable.traverse() better, start types of submoduleYobmod2021-06-302-1/+14
|/
* Adds repo.is_valid_object checkRobert Westman2021-06-051-0/+28
|
* Conditionally throw an errorSebastian Thiel2021-06-041-1/+1
|
* Reverts auto format introduced with 2dbc2be8Robert Westman2021-06-031-10/+8
|
* Fixes test to not throw false negative resultsRobert Westman2021-06-031-1/+2
|
* Adds failing test for repo.tag() methodRobert Westman2021-06-031-7/+18
|
* improve index mode for files with executable bitTodd Zullinger2021-05-251-2/+13
| | | | | | | | | | | | | | | | | The fix for #430 in bebc4f56 (Use correct mode for executable files, 2016-05-19) is incomplete. It fails (in most cases) when files have modes which are not exactly 0644 or 0755. Git only cares whether the executable bit is set (or not). Ensure the mode we set for the index is either 100644 or 100755 based on whether the executable bit is set for the file owner. Do this similarly to how upstream git does it in cache.h¹. Add a test covering various file modes to help catch regressions. Fixes #1253 ¹ https://github.com/git/git/blob/v2.31.1/cache.h#L247
* add initial types to remote.pyyobmod2021-05-035-1/+73
|
* add newlinesyobmod2021-02-281-0/+0
|
* add newlineyobmod2021-02-281-1/+1
|
* add testrunner.py to run all tests (as hook for static analysis)yobmod2021-02-281-0/+7
|
* add replace method to git.CommitLars Kellogg-Stedman2021-02-151-0/+20
| | | | | | | | | | | This adds a replace method to git.Commit. The replace method returns a copy of the Commit object with attributes replaced from keyword arguments. For example: >>> old = repo.head.commit >>> new = old.replace(message='This is a test') closes #1123
* Fix inheritance issue at commit.iter_itemsYuri Volchkov2021-02-051-0/+7
| | | | | | | The iterator used to yield Commit() objects, which does not play well with inheritance. Yield cls() instead. Signed-off-by: Yuri Volchkov <yuri@volch.org>
* fix tests the fast waySebastian Thiel2021-01-081-8/+10
|
* try fixing up test fixtures and implementationSebastian Thiel2021-01-061-4/+8
|
* Fix default actor name handlingAthos Ribeiro2020-10-231-4/+14
| | | | | | | | In c96476b, the new default_name nested function does not contain a retun statement. This leads to an issue when the environment variables are not present, where the actor name would not be set. Signed-off-by: Athos Ribeiro <athos@redhat.com>
* Get system user id in a lazy mannerAthos Ribeiro2020-10-221-1/+24
| | | | | | | | | | | | | | | | Calling getpass.getuser may lead to breakage in environments where there is no entries in the /etc/passwd file for the current user. Setting the environment variables for the git user configurations should prevents GitPython from using values from /etc/passwd. However, doing so will not prevent reading /etc/passwd and looking for an entry with the current user UID. This patch changes the behavior described above so GitPython will perform a lazy evaluation of /etc/passwd, only doing so when the environment variables for the git user configuration are not available. Signed-off-by: Athos Ribeiro <athos@redhat.com>
* Keep flake happyXavier Verges2020-10-051-3/+5
|
* Do not break convention when updating sys.pathXavier Verges2020-10-051-0/+6
|
* git/repo/base.py: is_dirty(): Fix pathspec handlingArnaud Patard2020-09-281-0/+14
| | | | | | | | | | | | | It's possible to specify a pathspec (eg :!foo) to git diff/status/... but it currently fails with: git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128) cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree. Add missing '--' to the arguments to fix this ambiguity Signed-off-by: Arnaud Patard <apatard@hupstream.com>
* Fix typoEric Dill2020-09-091-1/+1
|
* Ensure that detached HEAD does not raise when comparing branch name.Jeremy Retailleau2020-09-031-0/+17
|
* Add missing rules to match hierarchy pathJeremy Retailleau2020-09-021-0/+8
|
* Add unit testsJeremy Retailleau2020-09-021-0/+99
|