summaryrefslogtreecommitdiff
path: root/git/test/test_index.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: move to root dirKonrad Weihmann2020-07-121-934/+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/+934
|
* tests: move to root dirKonrad Weihmann2020-07-121-934/+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>
* Fix flake8 errorsSebastian Thiel2020-05-281-1/+1
|
* Remove now unnecessary explicit Unicode string literal prefixesHarmon2020-02-251-12/+12
|
* Replace deprecated assertNotEquals alias with assertNotEqualHarmon2020-02-161-1/+1
| | | | In TestIndex.test_index_mutation
* Replace deprecated failUnlessRaises alias with assertRaises in testsHarmon2020-02-161-12/+12
|
* Remove and replace compat.string_typesHarmon2020-02-081-2/+2
|
* Remove checks for Python 2 and/or 3Harmon2020-02-081-5/+1
|
* removed trailing whitespacesPratik Anurag2019-10-151-2/+2
|
* renamed unused variablesPratik Anurag2019-10-151-2/+2
|
* As string is iterable, changed to isinstance checkMarcel2019-10-151-3/+5
| | | | test now works
* allow calling index.add, index.move and index.remove with single itemsMarcel2019-10-151-1/+8
| | | | | added testing for it closes #813
* Fix test_commit_msg_hook_success.Uri Baghin2019-09-281-1/+1
|
* git: index: base: use os.path.relpathRuslan Kuprieiev2018-04-041-0/+15
| | | | | | Fixes #743 Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
* Use automatic formattersHugo2018-03-181-2/+2
|
* Unnecessary generator - rewrite as a set comprehensionHugo2018-03-181-2/+2
|
* Unnecessary generator - rewrite as a list comprehensionHugo2018-03-181-2/+2
|
* Rewrite unnecessary dict/list/tuple calls as literalsHugo2018-03-181-3/+3
|
* Replace function call with set literalHugo2018-03-181-1/+1
|
* Drop support for EOL Python 2.6Hugo2018-03-181-11/+2
|
* RF: use HIDE_WINDOWS_KNOWN_ERRORS instead of is_win to skip hooks testsYaroslav Halchenko2017-11-281-1/+1
|
* RF(TST): skip all tests dealing with hooks on windowsYaroslav Halchenko2017-11-281-0/+1
|
* RF: no "need" for custom shebang on windows since just does not workYaroslav Halchenko2017-11-281-3/+1
|
* RF(+BF?): refactor hooks creation in a test, and may be make it compat with ↵Yaroslav Halchenko2017-11-281-32/+39
| | | | windows
* BF(PY26): {} -> {0}, i.e. explicit index for .format()Yaroslav Halchenko2017-11-271-2/+2
|
* IndexFile.commit() now runs pre-commit and post-commit and commit-msg hooks.satahippy2017-10-301-29/+85
|
* 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
* Fixes to support Python 2.6 again.Andreas Maier2016-10-241-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 casesKostis Anagnostopoulos2016-10-161-2/+9
|
* src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos2016-10-161-2/+1
|
* src: import os.path as ospKostis Anagnostopoulos2016-10-161-24/+26
|
* 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-4/+3
|
* src: No PyDev warningsKostis Anagnostopoulos2016-10-041-2/+2
| | | | | | | | + 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-1/+1
| | | | | | | | | + 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: Add and set HIDE_WINDOWS_KNOWN_ERRORS=Falsewinerr_showKostis Anagnostopoulos2016-10-031-22/+28
| | | | | + Collect all "acknowledged" failing TCs on Appveyor and use "HIDE_WINDOWS_KNOWN_ERRORS" var to hide them.
* Win, #519: FIX repo TCs.Kostis Anagnostopoulos2016-10-011-18/+17
| | | | | | | | | | | | | | | + 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.
* FIX tox/requirementsKostis Anagnostopoulos2016-09-291-3/+3
|
* Proc, #519: Rework error-exc msgs & log thread-pumps errorsKostis Anagnostopoulos2016-09-281-1/+1
| | | | | + No WindowsError exception. + Add `test_exc.py` for unicode issues. + Single-arg for decoding-streams in pump-func.
* 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.
* Win, #519: FIX with_rw_directory() to remove read-only dirsKostis Anagnostopoulos2016-09-281-5/+4
| | | | | + 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-3/+3
| | | + TCs: unittest-asserts for git-tests.
* src, #519: collect all is_<platform>() callsKostis Anagnostopoulos2016-09-271-4/+4
|
* test, #519: FIX appveyor conda & failures in py2.6 `assertRaisesRegexp`Kostis Anagnostopoulos2016-09-261-3/+7
|
* fix(test): deal with py2 and py3Sebastian Thiel2016-09-251-1/+3
| | | | | | It ain't pretty, but should do the job. Related to #514
* fix(index): improve LockedFD handlingSebastian Thiel2016-09-251-0/+17
| | | | | | | | | | Relying on the destructor will not work, even though the code used to rely on it. Now we handle failures more explicitly. Far from perfect, but a good start for a fix. Fixes #514
* Need spaces in Emacs style encoding commentSteven Colby2016-05-181-1/+1
| | | | | Although it's hard to see, PEP-0263 does have ws delimiting the 'coding' string. This commit will fix the root cause of (at least) one bug: https://lists.fedoraproject.org/archives/list/eclipse-sig@lists.fedoraproject.org/thread/5XQ5JRHG6DPPMGRDU7TA2AO4EYS2H7AG/
* fixed unittest of issue #407 for Python3Piotr Pietraszkiewicz2016-04-131-1/+1
|
* fix(index): avoid recursing endlessly in add()Piotr Pietraszkiewicz2016-04-131-0/+11
| | | | Issue #407