summaryrefslogtreecommitdiff
path: root/git/test/lib/helper.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: move to root dirKonrad Weihmann2020-07-121-375/+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/+375
|
* tests: move to root dirKonrad Weihmann2020-07-121-375/+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>
* Replace deprecated failUnlessRaises alias with assertRaises in testsHarmon2020-02-161-1/+1
|
* Remove check for Python 2.7Harmon2020-02-081-6/+0
|
* Remove and replace compat.string_typesHarmon2020-02-081-3/+3
|
* Fix performance regression, see #906Sebastian Thiel2019-08-141-1/+2
| | | | | | | | | Revert "use git rev-parse to look for config file" This reverts commit 0b6b90f9f1e5310a6f39b75e17a04c1133269e8f. Fix #906 Reopen #719
* use git rev-parse to look for config fileBenjamin Dauvergne2019-08-111-2/+1
|
* Drop support for EOL Python 2.6Hugo2018-03-181-6/+1
|
* Merge branch 'bf-includes' of https://github.com/yarikoptic/GitPython into ↵Sebastian Thiel2017-12-111-1/+5
|\ | | | | | | yarikoptic-bf-includes
| * BF: process included files before the restYaroslav Halchenko2017-11-271-1/+5
| |
* | RF: primarily flake8 lints + minor RF to reduce duplication in PATHEXTYaroslav Halchenko2017-11-271-3/+3
|/ | | | | I did keep some "bare" except with catch all Exception: , while tried to disable flake8 complaints where clearly all exceptions are to be catched
* Python 3.6 invalid escape sequence deprecation fixesVille Skyttä2017-04-091-1/+1
| | | | https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
* Spelling fixesVille Skyttä2017-03-091-1/+1
|
* fix(leaks, TCs): attempt to cleanup mman before deleting tmp-dirsKostis Anagnostopoulos2016-12-081-6/+10
|
* Fixes to support Python 2.6 again.Andreas Maier2016-10-241-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel2016-10-221-108/+114
|\ | | | | | | ankostis-cygwin
| * tc-helper: fix minor contexlib abuseKostis Anagnostopoulos2016-10-171-4/+3
| |
| * helper: minor fix prefix of temp-dirsKostis Anagnostopoulos2016-10-171-2/+2
| |
| * cygwin, #533: FIX daemon launchingKostis Anagnostopoulos2016-10-141-108/+115
| | | | | | | | | | | | | | | | + Rework git-daemon launching with `with` resource-management. + cmd: add `is_cygwin` optional override kwd on `Git.polish_url()`. - Cygwin TCs failing: - PY2: err: 13, fail: 3 - PY3: err: 12, fail: 3
| * cygwin, #533: Try to make it work with Cygwin's Git.Kostis Anagnostopoulos2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | + Make `Git.polish_url()` convert paths into Cygwin-friendly paths. + Add utility and soe TCs for funcs for detecting cygwin and converting abs-paths to `/cygdrive/c/...`. - Cygwin TCs failing: - PY2: err: 14, fail: 3 - PY3: err: 13, fail: 3
* | Fix some typosSantiago Castro2016-10-201-1/+1
|/
* remote, #525: FIX BUG push-cmd misses error messagesKostis Anagnostopoulos2016-10-141-16/+8
| | | | | | + Bug discovered after enabling TC in prev commit and rework of fetch. + remote_tc: unitestize assertions. + util: DEL unused `_mktemp()`.
* config, #525: polish more config-urlsKostis Anagnostopoulos2016-10-121-3/+4
|
* daemon, #525: simplify exception handlingKostis Anagnostopoulos2016-10-121-33/+5
|
* daemon, #525: FIX remote urls in config-filesKostis Anagnostopoulos2016-10-121-38/+54
| | | | | | | | | | | | + 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-6/+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-11/+9
|
* hidden win-errs: Let leaking TCs run till end, then hideKostis Anagnostopoulos2016-10-041-2/+4
| | | | | | | | | + 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-0/+5
| | | | | + Collect all "acknowledged" failing TCs on Appveyor and use "HIDE_WINDOWS_KNOWN_ERRORS" var to hide them.
* BF: log.info is a function, just pass msg, no .write!Yaroslav Halchenko2016-10-021-2/+2
|
* BF: @with_rw_directory must return decorated callYaroslav Halchenko2016-10-021-0/+2
| | | | As it was - many tests were simply not accounted/run at all
* RF: use @functools.wraps within decorators instead of manual __name__ ↵Yaroslav Halchenko2016-10-021-3/+6
| | | | | | reassignment @wraps does more and does it right ;)
* io, #519: ALL open() --> with open()Kostis Anagnostopoulos2016-10-011-4/+4
| | | + Some cases had restructuring of code.
* remote, #519: INCOMPLETE FIX-2 double-decoding push-infosKostis Anagnostopoulos2016-09-281-1/+2
| | | | + Unicode PY2/3 issues fixed also in pump stream func.
* remote, #519: FIX1-of-2 double-decoding push-infosKostis Anagnostopoulos2016-09-281-2/+6
| | | | | + When `universal_lines==True` (515a6b9ccf8) must tel `handle_process_output` to stop decoding strings.
* Win, #519: FIX with_rw_directory() to remove read-only dirsKostis Anagnostopoulos2016-09-281-16/+37
| | | | | + 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-4/+4
| | | + TCs: unittest-asserts for git-tests.
* Win, #519: FIX undead Git-daemon on WindowsKostis Anagnostopoulos2016-09-281-6/+30
| | | | | | | | | | | + On MINGW-git, daemon exists but if invoked as 'git daemon', DAEMON CANNOT DIE! + So, launch `git-daemon` on Apveyor, but - remote TCs fail due to paths problems. + Updated README instructions on Windows. + Restore disabled remote TCs on Windows. + Disable failures on daemon-tests only the last moment (raise SkipTest) so when ready, it will also pass.
* test, #519: Try appveyor advice for never-ending buildsKostis Anagnostopoulos2016-09-281-1/+1
| | | | | | | | | | | + see http://help.appveyor.com/discussions/problems/5334-nosetests-finsih-bu-build-stuck-and-next-job-dealys-to-start + Use `io.DEFAULT_BUFFER_SIZE`. + test_commit: replace asserts with unittest-asserts. - TRY Popen() NO universal_newlines: NO, reverted in next commits. + [travisci skip]
* src, #519: Improve daemon launch so Win does not stuckKostis Anagnostopoulos2016-09-271-31/+38
| | | | | | | + Retrofit try...finally blocks to ensure killing the daemon - now vulnerable also on Windows due to Popen() + CREATE_NEW_PROCESS_GROUP - BUT `test_base.test_with_rw_remote_and_rw_repo()` TC fails in MINGW due to invalid remote-URL in fetching-repo's config. Another day. - NEXT FREEZE to solve: test-diff_interface() under MINGW!
* src, #519: collect all is_<platform>() callsKostis Anagnostopoulos2016-09-271-4/+4
|
* win, #519: proc.terminate() instead of kill(SIGTERM)Kostis Anagnostopoulos2016-09-261-3/+2
| | | + test_diff: replace asserts with unittest-asserts.
* Win, #519: FIX WinHangs: Popen() CREATE_NEW_PROCESS_GROUP to allow killKostis Anagnostopoulos2016-09-261-5/+7
| | | | | + FIXED most hangs BUT no more `git-daemon` un-killable! + Use logger for utils to replace stray print().
* win: GC.collect on all TC.tearDown to fix appveyor hang runsKostis Anagnostopoulos2016-09-261-0/+2
| | | | | + Fixed the hangs at `test_git:TestGit.test_handle_process_output()`. [travisci skip]
* test: make git-daemon port configurable via envBenedikt Morbach2015-04-211-3/+7
| | | | | add a GIT_PYTHON_TEST_GIT_DAEMON_PORT to set a port other than 9418, for example for when you already have a daemon running on that port.
* test: Make git-daemon only listen on localhostBenedikt Morbach2015-04-211-1/+1
| | | | | | | | | | | | No reason to expose a daemon to all interfaces when it is only used for tests, which connect to localhost anyway. I'd love to use localhost here instead, but the git-daemon man page points out: If IPv6 is not supported, then --listen=hostname is also not supported and --listen must be given an IPv4 address. I don't know of a way to check if git has ipv6 support, but 127.0.0.1 should be around for the foreseeable future
* fix(docs): be clear about exit code handlingSebastian Thiel2015-04-081-3/+11
| | | | | | | | When pushing/pulling, we ignore errors unless it's exit code 128. The reason for this is now made explicit to make clear that issues are handled by PushInfo flags accordingly. Related #271
* Minor Flake8 fixes.Sebastian Thiel2015-02-091-4/+6
| | | | Latest version of it is required to show the issues travis shows as well