diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-04-19 17:30:57 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-04-19 17:30:57 +0200 |
| commit | d19943ea8489e06a1f5cd0bd545e0a0aeb4b8551 (patch) | |
| tree | a41904c7fbeb9065be976b5dd15661c931e644b2 /tests | |
| parent | a7026989dd1ea3b70cbfc80cf92077efb2f52ba3 (diff) | |
| download | python-apt-d19943ea8489e06a1f5cd0bd545e0a0aeb4b8551.tar.gz | |
* Update the code to use the new classes.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cache.py | 4 | ||||
| -rw-r--r-- | tests/depcache.py | 4 | ||||
| -rw-r--r-- | tests/getcache_mem_corruption.py | 8 | ||||
| -rwxr-xr-x | tests/memleak.py | 8 | ||||
| -rw-r--r-- | tests/pkgproblemresolver.py | 6 | ||||
| -rw-r--r-- | tests/pkgrecords.py | 6 | ||||
| -rw-r--r-- | tests/pkgsrcrecords.py | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/tests/cache.py b/tests/cache.py index 87a544e8..f0bf6761 100644 --- a/tests/cache.py +++ b/tests/cache.py @@ -9,8 +9,8 @@ import sys def main(): apt_pkg.init() - cache = apt_pkg.GetCache() - depcache = apt_pkg.GetDepCache(cache) + cache = apt_pkg.Cache() + depcache = apt_pkg.DepCache(cache) depcache.Init() i=0 all=cache.PackageCount diff --git a/tests/depcache.py b/tests/depcache.py index 19aba680..0d59648e 100644 --- a/tests/depcache.py +++ b/tests/depcache.py @@ -9,8 +9,8 @@ import sys def main(): apt_pkg.init() - cache = apt_pkg.GetCache() - depcache = apt_pkg.GetDepCache(cache) + cache = apt_pkg.Cache() + depcache = apt_pkg.DepCache(cache) depcache.Init() i=0 all=cache.PackageCount diff --git a/tests/getcache_mem_corruption.py b/tests/getcache_mem_corruption.py index c3f6eff3..c6e5ff80 100644 --- a/tests/getcache_mem_corruption.py +++ b/tests/getcache_mem_corruption.py @@ -13,12 +13,12 @@ class TestGetCache(unittest.TestCase): def testWrongInvocation(self): # wrongly invoke GetCache() rather than GetDepCache() - apt_cache = apt_pkg.GetCache() - self.assertRaises(ValueError, apt_pkg.GetCache, apt_cache) + apt_cache = apt_pkg.Cache() + self.assertRaises(ValueError, apt_pkg.Cache, apt_cache) def testProperInvocation(self): - apt_cache = apt_pkg.GetCache(apt.progress.OpTextProgress()) - apt_depcache = apt_pkg.GetDepCache(apt_cache) + apt_cache = apt_pkg.Cache(apt.progress.OpTextProgress()) + apt_depcache = apt_pkg.DepCache(apt_cache) if __name__ == "__main__": unittest.main() diff --git a/tests/memleak.py b/tests/memleak.py index 659091fc..5299f35f 100755 --- a/tests/memleak.py +++ b/tests/memleak.py @@ -29,10 +29,10 @@ for i in range(100): # no memleak, but more or less the apt.Cache.open() code for i in range(100): - cache = apt_pkg.GetCache() - depcache = apt_pkg.GetDepCache(cache) - records = apt_pkg.GetPkgRecords(cache) - list = apt_pkg.GetPkgSourceList() + cache = apt_pkg.Cache() + depcache = apt_pkg.DepCache(cache) + records = apt_pkg.PackageRecords(cache) + list = apt_pkg.SourceList() list.ReadMainList() dict = {} for pkg in cache.Packages: diff --git a/tests/pkgproblemresolver.py b/tests/pkgproblemresolver.py index a21d8d9d..0d6d0611 100644 --- a/tests/pkgproblemresolver.py +++ b/tests/pkgproblemresolver.py @@ -9,8 +9,8 @@ import sys def main(): apt_pkg.init() - cache = apt_pkg.GetCache() - depcache = apt_pkg.GetDepCache(cache) + cache = apt_pkg.Cache() + depcache = apt_pkg.DepCache(cache) depcache.Init() i=0 all=cache.PackageCount @@ -25,7 +25,7 @@ def main(): if ver is not None: depcache.MarkInstall(pkg) if depcache.BrokenCount > 0: - fixer = apt_pkg.GetPkgProblemResolver(depcache) + fixer = apt_pkg.ProblemResolver(depcache) fixer.Clear(pkg) fixer.Protect(pkg) # we first try to resolve the problem diff --git a/tests/pkgrecords.py b/tests/pkgrecords.py index 5866847d..2fe6ad20 100644 --- a/tests/pkgrecords.py +++ b/tests/pkgrecords.py @@ -10,14 +10,14 @@ import sys def main(): apt_pkg.init() - cache = apt_pkg.GetCache() - depcache = apt_pkg.GetDepCache(cache) + cache = apt_pkg.Cache() + depcache = apt_pkg.DepCache(cache) depcache.Init() i=0 print "Running PkgRecords test on all packages:" for pkg in cache.Packages: i += 1 - records = apt_pkg.GetPkgRecords(cache) + records = apt_pkg.PackageRecords(cache) if len(pkg.VersionList) == 0: #print "no available version, cruft" continue diff --git a/tests/pkgsrcrecords.py b/tests/pkgsrcrecords.py index 77670540..2ea9dd3a 100644 --- a/tests/pkgsrcrecords.py +++ b/tests/pkgsrcrecords.py @@ -10,12 +10,12 @@ import sys def main(): apt_pkg.init() - cache = apt_pkg.GetCache() + cache = apt_pkg.Cache() i=0 print "Running PkgSrcRecords test on all packages:" for x in cache.Packages: i += 1 - src = apt_pkg.GetPkgSrcRecords() + src = apt_pkg.SourceRecords() if src.Lookup(x.Name): #print src.Package pass |
