~ubuntu-branches/ubuntu/oneiric/apt-xapian-index/oneiric

« back to all changes in this revision

Viewing changes to test/test_indexer.py

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Enrico Zini, Colin Watson
  • Date: 2010-09-10 13:10:42 UTC
  • Revision ID: james.westby@ubuntu.com-20100910131042-0c9upj2ir95aly8x
Tags: 0.39
[ Enrico Zini ]
* Fixed tests on Ubuntu (Thanks Michael Vogt for the patch)
* Added cataloged-times plugin by Michael Vogt
* Handle multiple invocations of indexer via dbus
* Described axi-cache in the package description

[ Colin Watson ]
* Fix more crashes when the Dir::Cache::pkgcache file doesn't exist, along
  the same lines as Martin Pitt's change in 0.38 (LP: #267330).
* Use the new MSetItem attribute API, introduced in Xapian 1.0.0, rather
  than the sequence API which was removed in 1.1.0 (closes: #595916).
* Create the XDG cache directory with appropriate permissions if it
  doesn't exist.
* Set better NAME sections in manual pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
import subprocess
8
8
import tools
9
9
 
10
 
def smallcache(pkglist=["apt", "debtags", "gedit"]):
 
10
def smallcache(pkglist=["apt", "libept-dev", "gedit"]):
11
11
    class sc(object):
12
12
        def __init__(self, cache):
13
13
            self._pkgs = pkglist
63
63
 
64
64
    def testDeb822Rebuild(self):
65
65
        pkgfile = os.path.join(axi.XAPIANDBPATH, "packages")
66
 
        subprocess.check_call("apt-cache show apt debtags gedit > " + pkgfile, shell=True)
 
66
        subprocess.check_call("apt-cache show apt libept-dev gedit > " + pkgfile, shell=True)
67
67
 
68
68
        # No other indexers are running, ensure lock succeeds
69
69
        self.assert_(self.indexer.lock())
84
84
        # Perform the initial indexing
85
85
        progress = axi.indexer.SilentProgress()
86
86
        pre_indexer = axi.indexer.Indexer(progress, True)
87
 
        pre_indexer._test_wrap_apt_cache(smallcache(["apt", "debtags", "gedit"]))
 
87
        pre_indexer._test_wrap_apt_cache(smallcache(["apt", "libept-dev", "gedit"]))
88
88
        self.assert_(pre_indexer.lock())
89
89
        self.assert_(pre_indexer.setupIndexing())
90
90
        pre_indexer.rebuild()