summaryrefslogtreecommitdiff
path: root/git/test/test_tree.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: move to root dirKonrad Weihmann2020-07-121-108/+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/+108
|
* tests: move to root dirKonrad Weihmann2020-07-121-108/+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
|
* Unnecessary generator - rewrite as a set comprehensionHugo2018-03-181-1/+1
|
* Unnecessary generator - rewrite as a list comprehensionHugo2018-03-181-1/+1
|
* Rewrite unnecessary dict/list/tuple calls as literalsHugo2018-03-181-1/+1
|
* Drop support for EOL Python 2.6Hugo2018-03-181-4/+1
|
* Python 3.6 invalid escape sequence deprecation fixesVille Skyttä2017-04-091-2/+2
| | | | https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
* 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).
* src: import os.path as ospKostis Anagnostopoulos2016-10-161-4/+5
|
* 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.
* hidden win-errs: Let leaking TCs run till end, then hideKostis Anagnostopoulos2016-10-041-3/+2
| | | | | | | | | + 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-2/+2
| | | | | + 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-3/+17
| | | | | + Collect all "acknowledged" failing TCs on Appveyor and use "HIDE_WINDOWS_KNOWN_ERRORS" var to hide them.
* fix(tree): remove Tree.cache - use IndexFile.write_tree() insteadSebastian Thiel2015-12-141-85/+0
| | | | | | For more information, see CHANGES.rst Fixes #369
* fix(tree): show that fixing Tree.cache is not possibleSebastian Thiel2015-12-141-20/+35
| | | | | | | | | | The problem is that a per-tree modification API cannot work properly, as the sorting is based on full paths of all entries within the repository. This feat can only be achieved by the index, which to my knowledge already does it correctly. The only fix is to remove the misleading API entirely, which will happen in the next commit. Related to #369
* fix(tree): tree item sort now uses git-styleSebastian Thiel2015-12-131-0/+20
| | | | | | | | | Previously it was possible to generate trees which didn't appear legit to git as gitpython's sorting was a simple alpha-numeric sort. Git uses one that minimizes literal string comparisons though, and thus behaves slightly differently sometimes. Fixes #369
* Make flake8 happySebastian Thiel2015-01-061-1/+1
|
* test_tree worksSebastian Thiel2015-01-061-0/+1
|
* Fixed io types to make tests work on PY2 once again.py3Sebastian Thiel2015-01-051-3/+3
| | | | Now it's about going through PY3 issues
* initial set of adjustments to make (most) imports work.Sebastian Thiel2015-01-041-1/+1
| | | | More to come, especially when it's about strings
* Removed 'from X import *' whereever possibleSebastian Thiel2015-01-041-2/+5
|
* Bumped version, updated changelog, reduced code smellSebastian Thiel2015-01-041-4/+1
| | | | | There is more work to do though, as many imports are still incorrect. Also, there are still print statements
* Applied autopep8Sebastian Thiel2014-11-191-3/+3
| | | | | Commandline was autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/
* pep8 linting (trailing whitespace)Antoine Musso2014-11-161-1/+1
| | | | W291 trailing whitespace
* pep8 linting (whitespace before/after)Antoine Musso2014-11-161-9/+9
| | | | | | | | | | | | | E201 whitespace after '(' E202 whitespace before ')' E203 whitespace before ':' E225 missing whitespace around operator E226 missing whitespace around arithmetic operator E227 missing whitespace around bitwise or shift operator E228 missing whitespace around modulo operator E231 missing whitespace after ',' E241 multiple spaces after ',' E251 unexpected spaces around keyword / parameter equals
* pep8 linting (blank lines expectations)Antoine Musso2014-11-161-1/+1
| | | | | | E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n)
* pep8 linting (whitespaces)Antoine Musso2014-11-161-25/+24
| | | | | | | | | | | W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file
* tabs to 4 spaces - this won't make integrating the patches easier, but it's ↵Sebastian Thiel2014-02-091-130/+130
| | | | probably a good idea to go a little more pep8 (and fix sins of my youth ;) )
* Moved everything into the git subdirectory - some tests still need to be ↵Sebastian Thiel2010-11-251-0/+144
adjusted