/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to git/tests/__init__.py

  • Committer: James Westby
  • Date: 2007-03-30 16:20:00 UTC
  • mto: (0.215.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jw+debian@jameswestby.net-20070330162000-0muski7om3axcszs
Add some basic pack handling code.

It has classes for the index and data parts. It supports lookup of an object
name in the index, and then access to the object in the data part using the
offset returned from the index lookup.

There are many problems with it so far.

  * The mmap in python has no offset, so the whole files are mapped.
  * There is no support for delta objects.
  * There is no consistency checking.
  * The code is not hooked up to provide a simple API.
  * The code is not hooked in to the repo, so that objects are still not
    retrieved from packs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import unittest
20
20
import test_objects
 
21
import test_repository
 
22
import test_pack
21
23
 
22
24
def test_suite():
23
 
  test_modules = [test_objects]
 
25
  test_modules = [test_objects, test_repository, test_pack]
24
26
  loader = unittest.TestLoader()
25
27
  suite = unittest.TestSuite()
26
28
  for mod in test_modules:
27
29
    suite.addTest(loader.loadTestsFromModule(mod))
28
30
  return suite
29
31
 
 
32
if __name__ == '__main__':
 
33
  suite = test_suite()
 
34
  from unittest import TextTestRunner
 
35
  TextTestRunner().run(suite)
 
36