diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-03-19 13:39:56 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-03-19 13:39:56 +0100 |
| commit | 3e891e0fab308b7ccb4d315ac0b187676d374675 (patch) | |
| tree | a26d3e4a1c401e74ec0da1cf162cf3aaaf7e8150 /tests | |
| parent | 85839f4f241c99f9e4ebb0a6a8847a2d433f1160 (diff) | |
| parent | e3133a7e09eae842be16eb64d7888c5751d72e75 (diff) | |
| download | python-apt-3e891e0fab308b7ccb4d315ac0b187676d374675.tar.gz | |
* apt/gtk/widgets.py:
- Handle older versions of python-gobject which do not ship glib
* apt/package.py: Introduce the Version class
- Deprecate Package.candidate*() and Package.installed*(), except for
installedFiles.
- Provide Version.get_source() (LP: #118788)
- Provide Package.versions (Closes: #513236)
* apt/progress/: New package, replaces apt.progress and apt.gtk
- apt/progress/gtk2.py: Moved here from apt/gtk/widgets.py
- apt/progress/__init__.py: Move here from apt/progress.py
* doc/source/*: Improve the documentation
- Document more attributes and functions of apt_pkg (they are all listed)
* aptsources/distro.py:
- use iso_3166.xml instead of iso_3166.tab
- fix incorrect indent
* debian/control:
- add Recommends to iso-codes (for iso_3166.xml)
* apt/package.py:
- make sure to set the defaulttimeout back to the
original value (in getChangelog(), LP: #314212)
* apt/cache.py:
- when setting a alternative rootdir, read the
config from it as well
* python/configuration.cc, python/apt_pkgmodule.cc:
- add apt_pkg.ReadConfigDir()
* python/cache.cc, tests/getcache_mem_corruption.py:
- test if progress objects have the right methods
and raise error if not (thanks to Emanuele Rocca)
closes: #497049
* apt/package.py:
- avoid uneeded interal references in the Package objects
* apt/__init__.py:
- remove the future warning
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/getcache_mem_corruption.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/getcache_mem_corruption.py b/tests/getcache_mem_corruption.py new file mode 100644 index 00000000..42e9af00 --- /dev/null +++ b/tests/getcache_mem_corruption.py @@ -0,0 +1,24 @@ +#!/usr/bin/python +import apt +import apt_pkg +import re + +import unittest + +class TestGetCache(unittest.TestCase): + + def setUp(self): + apt_pkg.InitConfig() + apt_pkg.InitSystem() + + def testWrongInvocation(self): + # wrongly invoke GetCache() rather than GetDepCache() + apt_cache = apt_pkg.GetCache() + self.assertRaises(ValueError, apt_pkg.GetCache, apt_cache) + + def testProperInvocation(self): + apt_cache = apt_pkg.GetCache(apt.progress.OpTextProgress()) + apt_depcache = apt_pkg.GetDepCache(apt_cache) + +if __name__ == "__main__": + unittest.main() |
