summaryrefslogtreecommitdiff
path: root/gitdb/test
Commit message (Collapse)AuthorAgeFilesLines
* refact(elapsed): improve no div0 when time-elapsed too smallKostis Anagnostopoulos2016-10-282-16/+16
|
* fix(io): BREAKING, wrap more out-stream usagesKostis Anagnostopoulos2016-10-279-97/+94
| | | | | | + chrore(deps): depend on *contextlib2* for `ExitStack` in PY2. + refact(util): BREAKING API move consts out of utils. + style(pep8): fixe all sources.
* refact(win_errs): move HIDE_WINDOWS_KNOWN_ERRORS from main-code to testKostis Anagnostopoulos2016-10-253-5/+18
|
* test(travis): enable all tests (inc perf) on TravisCIKostis Anagnostopoulos2016-10-253-9/+0
|
* style(listuple): use literals for empty lists/tuplesKostis Anagnostopoulos2016-10-252-3/+3
|
* fix(win): FIX and HIDE 2 win-errors remainingv2.1.0.dev1Kostis Anagnostopoulos2016-10-248-67/+85
| | | | | + File-in-use errors were fixed with `gitdb.util.mman.collect()`! + This call is disabled `gitdb.util.HIDE_WINDOWS_KNOWN_ERRORS == False`. + Depend on latest smmp `v2.1.0.dev1` tag
* feat(io): breaking API: retrofit Packers as context-managers!Kostis Anagnostopoulos2016-10-245-110/+111
| | | | | | | | | | + Packers MUST be invoked inside `Withh...` blocks, or `_cursor` won't exist! + Had to drop NotLazy for their hierarchy :-( + Count entrances/exits. + feat(util: add `rmtree()` for READ_ONLY files on Windows. 3-->2 Windows TCs now fail.
* feat(io): Retrofit streams as context-managers.Kostis Anagnostopoulos2016-10-242-5/+10
| | | | | + feat(util): add logger. + feat(util): add suppress-ex context-handler (from PY3 sources).
* tc: HALF FIX of `test_pack_entity ()`Kostis Anagnostopoulos2016-10-221-3/+6
| | | | | + On Windows, you cannot write onto a file held by another live file-pointer (test_pack.py:#L204). + The TC fails later, on clean up (the usual).
* TCs: fix div-by-zero on elapsed times (appveyor CPU is fast!)Kostis Anagnostopoulos2016-10-223-11/+11
|
* Merge pull request #28 from scop/withSebastian Thiel2016-07-303-14/+8
|\ | | | | Handle more file open/close with "with"
| * Handle more file open/close with "with"Ville Skyttä2016-07-273-14/+8
| |
* | Spelling fixesVille Skyttä2016-07-274-4/+4
|/
* Make tests independent of actual repository dataSebastian Thiel2015-01-082-4/+5
| | | | | | | Therefore, hardcoded sha's are not allowed anymore, as the contents of the repository is unknown. Fixes #16, for real this time ;)
* Removed unused imports - should have been in the last commit obviouslySebastian Thiel2015-01-082-2/+0
|
* Fixed up tests to use the GITDB_TEST_GIT_REPO_BASE at all timesSebastian Thiel2015-01-085-36/+36
| | | | | | | I have verified that all tests are working, even without a parent git repository, as long as the said environment variable is set. Fixes #16
* Applied autopep8Sebastian Thiel2015-01-0417-123/+139
| | | | autopep8 -v -j 8 --max-line-length 120 --in-place --recursive
* Improved decompression test to scan the entire git repository, instead of ↵Sebastian Thiel2015-01-011-2/+4
| | | | | | | | just packs This should make it easier to assert the issue is truly fixed now [skip ci]
* Bumped new versionSebastian Thiel2015-01-011-2/+2
| | | | Fixed tiny issue in python 3
* Added integrity test for loose objects to search large datasets forSebastian Thiel2015-01-011-0/+31
| | | | | | the issue described in https://github.com/gitpython-developers/GitPython/issues/220 See test notes for proper usage, it all depends on a useful dataset with high entropy
* Slightly improved loose object decompression testSebastian Thiel2015-01-011-1/+9
|
* Increased initial size of decompressed data to obtain loose object header ↵Sebastian Thiel2015-01-013-6/+10
| | | | | | | | | information This appears to fix https://github.com/gitpython-developers/GitPython/issues/220 , in this particular case. Nonetheless, we might just have gotten lucky here, and the actual issue is not yet solved and can thus re-occour. It would certainly be best to churn through plenty of loose objects to assure this truly works now. Maybe the pack could be recompressed as loose objects to get a sufficiently large data set
* It seems zlib works differently in py26, and thus requires special handling.py2n3Sebastian Thiel2014-11-141-12/+1
| | | | This also explains why the tests suddenly stopped working - after all, the interpreter changed ... .
* Now I am skipping a problematic test on travis CI.Sebastian Thiel2014-11-141-2/+12
| | | | Maybe I can find a py 2.6 interpreter somewhere to reproduce it.
* Added requirements.txt for pip, and optimized test-suite performance on travis.Sebastian Thiel2014-11-146-4/+31
| | | | With a bit of luck, this one will just work now.
* Performance tests are now part of the test-suite.Sebastian Thiel2014-11-145-46/+43
| | | | | | | By default, a small repository will be tested, which doesn't take that long actually (~20s) Additionally, that way we enforce correctness tests, which didn't run by default previously. As we are handling data here, we must be sure that it's handled correctly, thus the tests should run.
* reduced usage of force_bytes as clients are expected to pass bytes.Sebastian Thiel2014-11-132-7/+8
| | | | | | It was useful for debugging though, maybe an explicit type assertions would help others ? As 'others' will be gitpython, I suppose I can handle it myself
* Now tests work consistently in py2 and 3Sebastian Thiel2014-11-131-1/+1
| | | | It's a nice way of saying that there is still one failing, consistently.
* Fully removed all async dependenciesSebastian Thiel2014-11-136-209/+1
|
* Fixed all applicable lint issuesSebastian Thiel2014-11-1315-44/+55
|
* Merge branch 'kevin-brown-issue_4' into py2n3Sebastian Thiel2014-11-1313-300/+305
|\ | | | | | | | | | | | | | | | | | | Conflicts: gitdb/base.py gitdb/fun.py gitdb/pack.py gitdb/stream.py gitdb/test/lib.py gitdb/util.py
| * Made sure xrange is used instead of range in python 2Sebastian Thiel2014-11-133-4/+7
| | | | | | | | | | | | | | range in py2 will return a list, which can mean a lot of time and memory is spent on generating it even though it's just used for iteration. Simplified implementation of MAXSIZE
| * Fixed a few more encoding issuesKevin Brown2014-07-161-1/+2
| | | | | | | | | | | | | | | | Bytes should always be returned from the streams, so the tests should be checking against byte strings instead of text strings. This also fixes the `sha_iter` as it relied on the Python 2 `iterkeys` which has been renamed to `keys` in Python 3.
| * Start up compat and encoding filesKevin Brown2014-07-161-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few things which were being reused consistently for compatibility purposes, such as the `buffer`/`memoryview` functions as well as the `izip` method which needed to be aliased for Python 3. The `buffer` function was taken from `smmap` [1] and reworked slightly to handle the optional third parameter. This also adds a compatibility file dedicated entirely to encoding issues, which seem to be the biggest problem. The main functions were taken in part from the Django project [2] and rewritten slightly because our needs are a bit more narrow. A constants file has been added to consistently handle the constants which are required for the gitdb project in the core and the tests. This is part of a greater plan to reorganize the `util.py` file included in this project. This points the async extension back at the original repository and points it to the latest commit. [1]: https://github.com/Byron/smmap/blob/1af4b42a2354acbb53c7956d647655922658fd80/smmap/util.py#L20-L26 [2]: https://github.com/django/django/blob/b8d255071ead897cf68120cd2fae7c91326ca2cc/django/utils/encoding.py
| * Fix Python 2 failuresKevin Brown2014-07-132-8/+9
| |
| * Making a bit of progress...Kevin Brown2014-07-134-24/+6
| | | | | | | | | | | | | | This changes the internals to use BytesIO over StringIO, which fixed a few of the failing tests in Python 3. We are only importing from `io` now, instead of the entire chain, as this is available in Python 2.6+.
| * Bytes for everyone!Kevin Brown2014-07-132-4/+3
| |
| * More bytes handlingKevin Brown2014-07-131-1/+1
| |
| * Convert strings to bytes for PY3Kevin Brown2014-07-133-14/+14
| | | | | | | | | | | | In Python 3, the default string type is now the Python 2 unicode strings. The unicode strings cannot be converted to a byte stream, so we have to convert it before writing to the streams.
| * Pick off the low hanging fruitKevin Brown2014-07-1313-31/+59
| | | | | | | | | | | | | | | | | | | | | | This fixes most of the import errors that came from using the implicit relative imports that Python 2 supports. This also fixes the use of `xrange`, which has replaced `range` in Python 3. The same has happened for `izip`, which is also being aliased. The octal number syntax changed in Python 3, so we are now converting from strings using the `int` built-in function, which will produce the same output across both versions of Python.
| * Automated PEP 8 fixesKevin Brown2014-07-1313-245/+237
| |
* | Minor adjustments to adapt to changes in async (due to be removed anyway)Sebastian Thiel2014-11-132-4/+1
|/
* tabs to spacesSebastian Thiel2014-02-0917-1392/+1392
|
* Optimized test_pack_streaming not to cache the objects anymore. Instead an ↵Sebastian Thiel2011-07-051-3/+2
| | | | iterator is provided which does the job. Previously it would easily use 750 MB of ram to keep all the associated objects, more than 350k. Still a lot of memory for just 350k objects, but its python after all
* Fixed up docs for upcoming release. Bumped version to 0.5.3Sebastian Thiel2011-06-131-1/+1
|
* Added changelog informationSebastian Thiel2011-06-101-1/+4
|
* Fixed _perf module, which built, but didn't link dynamically. All the time, ↵Sebastian Thiel2011-03-311-0/+43
| | | | | | I think it never successfully imported, but its hard to believe this slipped by. Added performance test for pack-writing, which isn't really showing what I want as it currently read data from a densly compressed pack which takes most of the time in the nearly pure python implementation. Compared to c++, all the measured performance is just below anything I'd want to use. But we shouldn't forget this is just a test implementation, writing packs is quite simple actually, if you leave out the delta compression part and the delta logic
* crc needs to be done on the pack object header as well, of courseSebastian Thiel2011-03-311-1/+1
|
* Implemented remainder of the test, and it already shows that something is ↵Sebastian Thiel2011-03-312-12/+29
| | | | wrong with my packs. Probably something stupid ;)
* initial version of pack writing, which seems to work, but still needs some ↵Sebastian Thiel2011-03-311-13/+38
| | | | more testing and verification