aboutsummaryrefslogtreecommitdiff
path: root/git/test/test_repo.py
AgeCommit message (Collapse)Author
2020-07-12tests: move to root dirKonrad Weihmann
This should ensure that tests are NOT packaged into release package by setuptools, as tests are development only + fixtures after moving Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
2020-07-12Revert moving tests out of 'git' folder, related to #1030Sebastian Thiel
2020-07-12tests: move to root dirKonrad Weihmann
This should ensure that tests are NOT packaged into release package by setuptools, as tests are development only + fixtures after moving Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
2020-02-25Remove now unnecessary explicit Unicode string literal prefixesHarmon
2020-02-16Remove test.lib.asserts and use unittest.mock.patch directlyHarmon
2020-02-16Replace assert_false with assertFalseHarmon
2020-02-16Replace assert_true with assertTrueHarmon
Also change TestOutputStream to subclass TestBase rather than object
2020-02-16Replace raises with assertRaisesHarmon
2020-02-16Replace assert_equal with assertEqualHarmon
Also change TestActor to subclass TestBase rather than object and create and use base TestCommitSerialization class for assert_commit_serialization method
2020-02-16Replace deprecated assertRaisesRegexp alias with assertRaisesRegexHarmon
In TestRepo.test_should_display_blame_information
2020-02-16Replace deprecated failUnlessRaises alias with assertRaises in testsHarmon
2020-02-16Remove checks for pathlib existence in TestRepo for Python < 3.4Harmon
2020-02-08Fix Repo.__repr__ when subclassedJan Matějka
2020-02-08Remove now unused is_invoking_git variable in testHarmon
2020-02-08Remove no longer used imports in testsHarmon
2020-02-08Remove no longer used compat importsHarmon
2020-02-08Remove and replace compat.string_typesHarmon
2020-02-08Remove checks for Python 2 and/or 3Harmon
2019-12-29Added parsing for '@1400000000 +0000' date format as used by git commit hooks.Dries
2019-10-28Fix #920Victor Luzgin
2019-10-15removed Unnecessary pass statementPratik Anurag
2019-09-10Fix #889: Add DeepSource config and fix some major issuesMohit Solanki
2019-08-14Adding testArthur Milchior
2019-07-06Add support to pass clone options that can be repeated multiple timesSteven Whitman
2018-10-13Respect _common_dir when finding repository config fileLuc Ritchie
Among other things, remotes are now correctly identified when in a separate worktree.
2018-07-15Allow pathlib.Path in Repo.__init__oldPadavan
2018-05-18648 max_chunk_size can be now set to control output_stream behaviorPiotr Babij
2018-03-18Replace function call with set literalHugo
2018-03-18Drop support for EOL Python 2.6Hugo
2017-10-07Converting path in clone and clone_from to str before any other operation in ↵Mikuláš Poul
case eg pathlib.Path is passed
2017-09-30Keeping env values passed to `clone_from`Piotr Babij
2017-08-22worktrees: make non-packed refs also work correctly.Peter Jones
Turns out aec58a9 did the right thing for /packed/ refs, but didn't work correctly on /unpacked/ refs. So this patch gives unpacked refs the same treatment. Without the fix here, the test added will cause this traceback: ====================================================================== ERROR: Check that we find .git as a worktree file and find the worktree ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pjones/devel/github.com/GitPython/git/test/lib/helper.py", line 92, in wrapper return func(self, path) File "/home/pjones/devel/github.com/GitPython/git/test/test_repo.py", line 938, in test_git_work_tree_dotgit self.assertIsInstance(repo.heads['aaaaaaaa'], Head) File "/home/pjones/devel/github.com/GitPython/git/util.py", line 893, in __getitem__ raise IndexError("No item found with id %r" % (self._prefix + index)) IndexError: No item found with id 'aaaaaaaa' Woops. Things I've learned: - test_remote doesn't work currently if you start on a branch. I think it never did? - Because of 346424da, all *sorts* of stuff in the test suite doesn't work if you name your development branch "packed-refs" (This seems like a bug...) Signed-off-by: Peter Jones <pjones@redhat.com>
2017-07-01Repo: handle worktrees betterPeter Jones
This makes Repo("foo") work when foo/.git is a file of the form created by "git worktree add", i.e. it's a text file that says: gitdir: /home/me/project/.git/worktrees/bar and where /home/me/project/.git/ is the nominal gitdir, but /home/me/project/.git/worktrees/bar has this worktree's HEAD etc and a "gitdir" file that contains the path of foo/.git . Signed-off-by: Peter Jones <pjones@redhat.com>
2017-04-09Python 3.6 invalid escape sequence deprecation fixesVille Skyttä
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2017-03-09Spelling fixesVille Skyttä
2017-03-07Add a fixture to test incremental blame output for git 2.11.1+George Hickman
2017-02-25chore(flake): satisfy linterSebastian Thiel
2017-02-24check for GIT_WORK_TREETimothy B. Hartman
2016-10-24Fixes to support Python 2.6 again.Andreas Maier
Details: - Added Python 2.6 again to .travis.yml (it was removed in commit 4486bcb). - Replaced the use of dictionary comprehensions in `git/cmd.py` around line 800 with the code before that change (in commit 25a2ebf). Reason: dict comprehensions were introduced only in Python 2.7. - Changed the import source for `SkipTest` and `skipIf` from `unittest.case` to first trying `unittest` and upon ImportError from `unittest2`. This was done in `git/util.py` and in several testcases. Reason: `SkipTest` and `skipIf` were introduced to unittest only in Python 2.7, and `unittest2` is a backport of `unittest` additions to Python 2.6. - In git/test/lib/helper.py, fixed the definition of `assertRaisesRegex` to work on py26. - For Python 2.6, added the `unittest2` dependency to `requirements.txt` and changed `.travis.yml` to install `unittest2`. Because git/util.py uses SkipTest from unittest/unittest2, the dependency could not be added to `test-requirements.txt`. - Fixed an assertion in `git/test/test_index.py` to also allow a Python 2.6 specific exception message. - In `is_cygwin_git()` in `git/util.py`, replaced `check_output()` with `Popen()`. It was added in Python 2.7. - Enabled Python 2.6 for Windows: - Added Python 2.6 for MINGW in .appveyor.yml. - When defining `PROC_CREATIONFLAGS` in `git/cmd.py`, made use of certain win32 and subprocess flags that were introduced in Python 2.7, dependent on whether we run on Python 2.7 or higher. - In `AutoInterrupt.__del__()` in `git/cmd.py`, allowed for `os` not having `kill()`. `os.kill()` was added for Windows in Python 2.7 (For Linux, it existed in Python 2.6 already).
2016-10-22fix(win_mmap): unmark hidden win_errors due to smmap unicode foesKostis Anagnostopoulos
Now 2 more TCs pass in Windows: + TestRepo.test_file_handle_leaks() + TestObjDbPerformance.test_random_access() See https://github.com/gitpython-developers/smmap/pull/30
2016-10-16cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 casesKostis Anagnostopoulos
2016-10-16cygwin, #533: FIX submodules detection (~10TCs fixed)Kostis Anagnostopoulos
+ Decygpath sm's `.git` file contents. + Polish another path in `git add`; actually no main-code changes, just a replace \-->/ on a relative(!) path to make cygwin-git to work. - REGRESSION `test_git_submodules_and_add_sm_with_new_commit` asks for user/email settings. - Cygwin TCs failing: - PY2: err: 2, fail: 1 - PY3: err: 2, fail: 1
2016-10-16ci, deps: no PY26, ddt>=1.1.1, CIs `pip install test-requirements`Kostis Anagnostopoulos
+ Use environment-markers in requirement files (see http://stackoverflow.com/a/33451105/548792).
2016-10-16src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos
2016-10-16src: import os.path as ospKostis Anagnostopoulos
2016-10-14cygwin, #533: Allow '/cygdrive/c/' paths on repo initKostis Anagnostopoulos
- Cygwin TCs failing: - PY2: err: 13, fail: 2 - PY3: err: 12, fail: 2
2016-10-12daemon, #525: FIX remote urls in config-filesKostis Anagnostopoulos
+ Parse most remote & config-urls \-->/. + Used relative daemon-paths. + Use git-daemon PORT above 10k; on Windows all below need Admin rights. +FIXED git-daemon @with_rw_and_rw_remote_repo(): + test_base.test_with_rw_remote_and_rw_repo() PASS. + test_remote.test_base() now freezes! (so still hidden win_err) + repo_test: minor finally delete test-repos created inside this repo. + util: delete unused `absolute_project_path()`.
2016-10-11remote: unfix fetch-infos paring of 8a2f7dce4(pydev fixes)Kostis Anagnostopoulos
+ Mark another TC failing when not in master.
2016-10-11FIX #526: Do not depend on test-sourcesKostis Anagnostopoulos
+ Move `HIDE_WINDOWS_KNOWN_ERRORS` flag from `git.test.lib.helper-->git.util`; regular modules in main-sources folder also depend on that flag. + Use unittest.SkipTest instead of from non-standard `nose` lib.
2016-10-04src: No PyDev warningsKostis Anagnostopoulos
+ Mark all unused vars and other non-pep8 (PyDev) warnings + test_utils: + enable & fix forgotten IterableList looped path. + unittestize all assertions. + remote: minor fix progress dispatching unknown err-lines