summaryrefslogtreecommitdiff
path: root/git/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix some typosSantiago Castro2016-10-202-2/+2
|
* Fix flake8 errorBenjamin Poldrack2016-10-191-1/+1
|
* Add a test for persistent git optionsBenjamin Poldrack2016-10-181-0/+14
|
* fix(surrogateescape): enable on py2, fix testsSebastian Thiel2016-10-161-2/+10
|
* fix(unicode): use surrogateescape in bytes.decodeSebastian Thiel2016-10-161-1/+1
| | | | | | | | | | | | | | That way, we will try to decode as default encoding (usually utf-8), but allow ourselves to simply keep bytes that don't match within the resulting unicode string. That way, we allow for lossless decode/encode cycles while still assuring that decoding never fails. NOTE: I was too lazy to create a test that would verify it, but manually executed https://github.com/petertodd/gitpython-unicode-error. fixes #532
* remote, #525: FIX BUG push-cmd misses error messagesKostis Anagnostopoulos2016-10-142-75/+81
| | | | | | + Bug discovered after enabling TC in prev commit and rework of fetch. + remote_tc: unitestize assertions. + util: DEL unused `_mktemp()`.
* remote, #525: pump fetch-infos instead of GIL-read stderrKostis Anagnostopoulos2016-10-131-12/+9
| | | | | | + `handle_process_output()` accepts null-finalizer, to pump completely stderr before raising any errors. + test: Enable `TestGit.test_environment()` on Windows (to checks stderr consumption).
* test, #525: allow disabling freeze errors separatelyKostis Anagnostopoulos2016-10-132-52/+58
| | | | | + cmd: use DEVNULL for non PIPEs; no open-file. + TCs: some unitestize-assertions on base & remote TCs.
* config, #525: polish more config-urlsKostis Anagnostopoulos2016-10-122-39/+42
|
* daemon, #525: simplify exception handlingKostis Anagnostopoulos2016-10-121-33/+5
|
* daemon, #525: FIX remote urls in config-filesKostis Anagnostopoulos2016-10-126-65/+73
| | | | | | | | | | | | + 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()`.
* hidden win_errors: mark also git-daemon errors failingKostis Anagnostopoulos2016-10-112-0/+17
|
* remote: unfix fetch-infos paring of 8a2f7dce4(pydev fixes)Kostis Anagnostopoulos2016-10-111-1/+4
| | | + Mark another TC failing when not in master.
* imp(performance): execute performance tests on travisSebastian Thiel2016-10-111-3/+0
| | | | Fixes #524
* FIX #526: Do not depend on test-sourcesKostis Anagnostopoulos2016-10-117-13/+8
| | | | | | + 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-046-83/+70
|
* src: No PyDev warningsKostis Anagnostopoulos2016-10-0412-92/+101
| | | | | | | | + 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-047-26/+24
| | | | | | | | | + 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-034-6/+5
| | | | | + 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-038-40/+90
| | | | | + Collect all "acknowledged" failing TCs on Appveyor and use "HIDE_WINDOWS_KNOWN_ERRORS" var to hide them.
* repo-TC: FIX HOME-expansion check, Appveyor has no HOME varKostis Anagnostopoulos2016-10-031-3/+4
|
* TST: Add test for removing submodule with remotes without refsYaroslav Halchenko2016-10-031-2/+20
|
* src, config_tc: replace deprecated `failUnlessRaises`Kostis Anagnostopoulos2016-10-031-13/+25
|
* 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 ;)
* TC, #519: DISABLE failing testsKostis Anagnostopoulos2016-10-013-1/+12
| | | + Just to see Apveyor all green and merge; the TCs HAVE TO BE FIXED.
* io, #519: ALL open() --> with open()Kostis Anagnostopoulos2016-10-018-29/+32
| | | + Some cases had restructuring of code.
* Win, #519: FIX repo TCs.Kostis Anagnostopoulos2016-10-013-115/+136
| | | | | | | | | | | | | | | + 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.
* repo-TCs, #519: FIX config resource leaksKostis Anagnostopoulos2016-10-012-37/+46
| | | | | | + Modify lock/read-config-file code to ensure files closed. + Use `with GitConfigarser()` more systematically in TCs. + Clear any locks left hanging from prev Tcs. + Util: mark lock-files as SHORT_LIVED; save some SSDs...
* ci: restore ci log-level to normal, coverage on Win-AppveyorKostis Anagnostopoulos2016-10-011-5/+3
| | | | + Extract util-method to delete lock-files, also on Windows (will be needed by TCs).
* cfg_TCs, #519: FIX config resource leaksKostis Anagnostopoulos2016-10-011-78/+93
| | | | | + Modify lock/read-config-file code to ansure files closed + Use `with GitConfigarser()` more systematically in TCs. + Clear any locks left hanging from pev Tcs
* FIX hook TC on PY3+Win & indeterministic lock timing.Kostis Anagnostopoulos2016-09-292-2/+6
| | | | | | | | | + Cannot `index.path` into ENV, it is bytes! + The hook TC never runs on linux! + Unblock removal of odbfile in perf-large streams TC. + Attempt to unblock removal of submodule file by intensive cleaning. more unblock files
* FIX tox/requirementsKostis Anagnostopoulos2016-09-291-3/+3
|
* remote, #519: INCOMPLETE FIX-2 double-decoding push-infosKostis Anagnostopoulos2016-09-281-1/+2
| | | | + Unicode PY2/3 issues fixed also in pump stream func.
* Proc, #519: Rework error-exc msgs & log thread-pumps errorsKostis Anagnostopoulos2016-09-284-5/+148
| | | | | + No WindowsError exception. + Add `test_exc.py` for unicode issues. + Single-arg for decoding-streams in pump-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, hook, #519: Consume Hook Popen-proc out of GILKostis Anagnostopoulos2016-09-281-71/+85
| | | | | | | | + HookException thrown on Popen, and were missed on Windows. + No SHELL on Popen?? + Minor fixes: + Try harder to delete trees - no remorses. + Simplify exception reprs. + Unittest-ize test_index assertions.
* io, dif: #519: FIX DIFF freeze when reading from GILKostis Anagnostopoulos2016-09-281-10/+10
| | | | | | | | | | | | | | | + CAUSE: In Windows, Diffs freeze while reading Popen streams, probably buffers smaller; good-thin(TM) in this case because reading a Popen-proc from the launching-thread freezes GIL. The alternative to use `proc.communicate()` also relies on big buffers. + SOLUTION: Use `cmd.handle_process_output()` to consume Diff-proc streams. + Retroffited `handle_process_output()` code to support also byte-streams, both Threading(Windows) and Select/Poll (Posix) paths updated. - TODO: Unfortunately, `Diff._index_from_patch_format()` still slurps input; need to re-phrase header-regexes linewise to resolve it.
* test: Start using `ddt` library for TCsKostis Anagnostopoulos2016-09-281-12/+16
| | | | | + DataDriven TCs for identifying which separate case failed. + appveyor: rework matrix, conda3.4 cannot install in develop mode
* Win, #519: FIX with_rw_directory() to remove read-only dirsKostis Anagnostopoulos2016-09-2812-48/+64
| | | | | + Stop using gitdb's respective helper. + Fix files chmod(555) which CANNOT DELETE on Windows (but do on Linux).
* TCs: unittestize many test-docs assertionsKostis Anagnostopoulos2016-09-281-29/+29
|
* src: constify is_<platform>() callsKostis Anagnostopoulos2016-09-286-29/+30
| | | + TCs: unittest-asserts for git-tests.
* Win, #519: FIX undead Git-daemon on WindowsKostis Anagnostopoulos2016-09-283-10/+31
| | | | | | | | | | | + 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: No remote TCs, git-daemon cannot die@!Kostis Anagnostopoulos2016-09-282-2/+5
|
* test, #519: Try appveyor advice for never-ending buildsKostis Anagnostopoulos2016-09-283-47/+50
| | | | | | | | | | | + 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-276-17/+17
|
* win, #519: proc.terminate() instead of kill(SIGTERM)Kostis Anagnostopoulos2016-09-262-39/+41
| | | + test_diff: replace asserts with unittest-asserts.
* Win, #519: FIX WinHangs: Popen() CREATE_NEW_PROCESS_GROUP to allow killKostis Anagnostopoulos2016-09-262-7/+10
| | | | | + FIXED most hangs BUT no more `git-daemon` un-killable! + Use logger for utils to replace stray print().