summaryrefslogtreecommitdiff
path: root/git/test/test_submodule.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: move to root dirKonrad Weihmann2020-07-121-947/+0
| | | | | | | | | 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>
* Revert moving tests out of 'git' folder, related to #1030Sebastian Thiel2020-07-121-0/+947
|
* tests: move to root dirKonrad Weihmann2020-07-121-947/+0
| | | | | | | | | 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>
* Accept that this arguably simple feature can't be tested easily…Sebastian Thiel2020-05-041-1/+2
| | | | | | | | | …and time is previous. Since I could reproduce it and see it working with the steps provided in the comment: https://github.com/gitpython-developers/GitPython/pull/1009#issuecomment-623008816 I think it's good for now. We also assume there won't be a regression.
* add test case for submodule depth parameterLiam Beguin2020-05-021-0/+8
| | | | Signed-off-by: Liam Beguin <liambeguin@gmail.com>
* Replace deprecated failUnlessRaises alias with assertRaises in testsHarmon2020-02-161-35/+35
|
* Remove and replace compat.string_typesHarmon2020-02-081-2/+2
|
* Fix testSantos Gallegos2019-07-201-3/+2
|
* Add testSantos Gallegos2019-07-201-0/+19
|
* github -> GitHubHugo2018-03-181-1/+1
|
* Drop support for EOL Python 2.6Hugo2018-03-181-4/+1
|
* RF: primarily flake8 lints + minor RF to reduce duplication in PATHEXTYaroslav Halchenko2017-11-271-1/+1
| | | | | I did keep some "bare" except with catch all Exception: , while tried to disable flake8 complaints where clearly all exceptions are to be catched
* Remove trailing slash on drive pathCharles Bouchard-Légaré2017-11-161-1/+11
|
* Update changelog and improve docs on skipped testSebastian Thiel2017-07-011-1/+2
| | | | [skip ci]
* Try to ignore test on windows as it fails for the wrong reasonsSebastian Thiel2017-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Here is the error log we see: ====================================================================== ERROR: test_git_submodules_and_add_sm_with_new_commit (git.test.test_submodule.TestSubmodule) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\gitpython\git\test\lib\helper.py", line 92, in wrapper return func(self, path) File "C:\projects\gitpython\git\test\test_submodule.py", line 709, in test_git_submodules_and_add_sm_with_new_commit smm.git.commit(m="new file added") File "C:\projects\gitpython\git\cmd.py", line 425, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "C:\projects\gitpython\git\cmd.py", line 877, in _call_process return self.execute(call, **exec_kwargs) File "C:\projects\gitpython\git\cmd.py", line 688, in execute raise GitCommandError(command, status, stderr_value, stdout_value) GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git commit -m new file added stderr: ' *** Please tell me who you are.
* Maybe work around AppVeyor setting a bad email?Peter Jones2017-07-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the submodule tests says: Traceback (most recent call last): File "C:\projects\gitpython\git\test\lib\helper.py", line 92, in wrapper return func(self, path) File "C:\projects\gitpython\git\test\test_submodule.py", line 706, in test_git_submodules_and_add_sm_with_new_commit smm.git.commit(m="new file added") File "C:\projects\gitpython\git\cmd.py", line 425, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "C:\projects\gitpython\git\cmd.py", line 877, in _call_process return self.execute(call, **exec_kwargs) File "C:\projects\gitpython\git\cmd.py", line 688, in execute raise GitCommandError(command, status, stderr_value, stdout_value) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git commit -m new file added stderr: ' *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'appveyor@APPVYR-WIN.(none)')' Clearly this is failing because (none) isn't a valid TLD, but I figure I'll try to set a fake value and see if that works around it.
* Python 3.6 invalid escape sequence deprecation fixesVille Skyttä2017-04-091-3/+3
| | | | https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
* Merge pull request #541 from andy-maier/py26_fixesSebastian Thiel2016-12-081-1/+4
|\ | | | | Fixes to support Python 2.6 again.
| * Fixes to support Python 2.6 again.Andreas Maier2016-10-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | chore(lint): flake8Sebastian Thiel2016-12-081-1/+1
|/ | | | | | | | Interestingly only shows in particular python versions on travis. Maybe some caching effect? Locally it is reproducible easily, with the latest flake8
* Merge branch 'win_mmap' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel2016-10-221-15/+1
|\ | | | | | | ankostis-win_mmap
| * fix(win_mmap): unmark hidden win_errors due to smmap unicode foesKostis Anagnostopoulos2016-10-221-1/+0
| | | | | | | | | | | | | | 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
| * submodule-TCs: stop monekypatching smmap.MapRegion with files in WindowsKostis Anagnostopoulos2016-10-221-14/+0
| | | | | | | | Obviously it is not needed anymore, or nothing is worse without this monkeypatch.
* | Merge with latest branch 'exp_git_dir'Kostis Anagnostopoulos2016-10-191-18/+8
|\ \ | |/ |/| | | | | | | | | Conflicts: git/repo/base.py git/repo/fun.py git/test/test_submodule.py
| * repo: minor code and doc correcions.Kostis Anagnostopoulos2016-10-191-2/+2
| | | | | | | | | | | | | | + Expansion of paths also `osp.normalize()` them. + Make Repo-fields --> class-fields to avoid initializations on construct. + Explain and rename `git.repo.fun.find_git_dir()` is for submodules (`find_submodule_git_dir()`).
* | cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 casesKostis Anagnostopoulos2016-10-161-6/+24
| |
* | ci, deps: no PY26, ddt>=1.1.1, CIs `pip install test-requirements`Kostis Anagnostopoulos2016-10-161-1/+1
| | | | | | | | + Use environment-markers in requirement files (see http://stackoverflow.com/a/33451105/548792).
* | cygwin, #533: polish abs-paths in `git add` commandsKostis Anagnostopoulos2016-10-161-1/+1
|/ | | | | | | | | | | + Modify TCs - no main-code changes. + FIXed: + `TestSubmodule.test_git_submodules_and_add_sm_with_new_commit()` + TestDiff.test_diff_with_staged_file() - Cygwin TCs failing: - PY2: err: 12, fail: 2 - PY3: err: 11, fail: 2
* config, #525: polish more config-urlsKostis Anagnostopoulos2016-10-121-36/+38
|
* daemon, #525: FIX remote urls in config-filesKostis Anagnostopoulos2016-10-121-1/+1
| | | | | | | | | | | | + 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()`.
* FIX #526: Do not depend on test-sourcesKostis Anagnostopoulos2016-10-111-1/+1
| | | | | | + 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.
* io: Wrap (probably) allconfig_writers in `with` blocksKostis Anagnostopoulos2016-10-041-46/+39
|
* src: No PyDev warningsKostis Anagnostopoulos2016-10-041-3/+3
| | | | | | | | + 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
* hidden win-errs: Let leaking TCs run till end, then hideKostis Anagnostopoulos2016-10-041-8/+8
| | | | | | | | | + Detect code breaking the body of TCs eventually hidden win-errors by raising SkipTest ALAP. + submodule.base.py: import classes from `git.objects` instead of `utils`. + had to ++ ulimit 100->110 for the extra code tested (more leaks :-) + Centralize is_win detection.
* Appveyor: Set HIDE_WINDOWS_KNOWN_ERRORS=TrueKostis Anagnostopoulos2016-10-031-1/+1
| | | | | + Update error-conditions for PY-versions. + The purpose is to have NO TC FAILURES (with the minimum possible conditions).
* Appveyor: Add and set HIDE_WINDOWS_KNOWN_ERRORS=Falsewinerr_showKostis Anagnostopoulos2016-10-031-11/+21
| | | | | + Collect all "acknowledged" failing TCs on Appveyor and use "HIDE_WINDOWS_KNOWN_ERRORS" var to hide them.
* TST: Add test for removing submodule with remotes without refsYaroslav Halchenko2016-10-031-2/+20
|
* TC, #519: DISABLE failing testsKostis Anagnostopoulos2016-10-011-0/+4
| | | + Just to see Apveyor all green and merge; the TCs HAVE TO BE FIXED.
* Win, #519: FIX repo TCs.Kostis Anagnostopoulos2016-10-011-1/+2
| | | | | | | | | | | | | | | + FIX TestRepo.test_submodule_update(): + submod: del `.git` file prior overwrite; Windows denied otherwise! + FIX TestRepo.test_untracked_files(): + In the `git add <file>` case, it failed with unicode args on PY2. Had to encode them with `locale.getpreferredencoding()` AND use SHELL. + cmd: add `shell` into `execute()` kwds, for overriding USE_SHELL per command. + repo: replace blocky `communicate()` in `_clone()` with thread-pumps. + test_repo.py: unittestize (almost all) assertions. + Replace open --> with open for index (base and TC). + test_index.py: Enabled a dormant assertion.
* Win, #519: FIX with_rw_directory() to remove read-only dirsKostis Anagnostopoulos2016-09-281-1/+1
| | | | | + Stop using gitdb's respective helper. + Fix files chmod(555) which CANNOT DELETE on Windows (but do on Linux).
* src: constify is_<platform>() callsKostis Anagnostopoulos2016-09-281-1/+1
| | | + TCs: unittest-asserts for git-tests.
* src, #519: collect all is_<platform>() callsKostis Anagnostopoulos2016-09-271-2/+2
|
* win: GC.collect on all TC.tearDown to fix appveyor hang runsKostis Anagnostopoulos2016-09-261-0/+4
| | | | | + Fixed the hangs at `test_git:TestGit.test_handle_process_output()`. [travisci skip]
* fix(tests): remove dependency on sort orderSebastian Thiel2015-08-081-1/+1
| | | | | | | Now we select the submodule by name, not by index. The latter is not deterministic. Closes #335
* tests(submodule): add new submodule commitsSebastian Thiel2015-08-081-1/+32
| | | | | | | | It's somewhat more complex to add new commits in submodules to the parent repository. The new test shows how to do that in a 'GitPythonic' way. Related to #335
* Minor improvements to submodule test for windows portabilitySebastian Thiel2015-01-221-4/+4
| | | | | | | | | However, most tests fail for reasons unknown - SHA cannot be found. For now, I will wait until someone complains, as I doubt too many people will use it on windows. Related to #244
* Overhauled all tutorials, and placed them in a unit-test.Sebastian Thiel2015-01-221-9/+15
| | | | | | That way they are protected from regression. Fixes #239
* Initial set of documentation improvements, and a fix to the submodule tests.Sebastian Thiel2015-01-211-1/+1
| | | | | | Now travisci tests should work once again. Related to #239
* Assured that branch changes are properly handled.Sebastian Thiel2015-01-211-2/+65
| | | | | | | | | Previously we could try to remove the branch we are on. Of course, we have a test-case elaborate enough to verify we don't destroy changes in submodules accidentally. Therefore I am confident that this implementation is correct. Fixes #49
* Fixed flake8 and a minor test regression.Sebastian Thiel2015-01-201-2/+2
| | | | | The latter happened as now BadName is thrown, instead of BadObject. Changes.rst was marked accordingly