diff options
| author | Colin Watson <cjwatson@canonical.com> | 2012-11-19 13:22:42 +0000 |
|---|---|---|
| committer | Colin Watson <cjwatson@canonical.com> | 2012-11-19 13:22:42 +0000 |
| commit | a0ecfe1c745e07c41c85b80d747b19179341531d (patch) | |
| tree | f3a428be5067397aa2585b31890ccd3b949b6f2b /tests/test_apt_cache.py | |
| parent | 386f2f98ac0860d3d34c60127232703fb0122001 (diff) | |
| download | python-apt-a0ecfe1c745e07c41c85b80d747b19179341531d.tar.gz | |
* aptsources/distinfo.py, aptsources/distro.py, aptsources/sourceslist.py,
tests/test_apt_cache.py, tests/test_debfile_multiarch.py:
- Use logging.warning rather than the deprecated logging.warn.
Diffstat (limited to 'tests/test_apt_cache.py')
| -rw-r--r-- | tests/test_apt_cache.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 3cf89c07..fe90eb8a 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -34,7 +34,7 @@ def if_sources_list_is_readable(f): if os.access("/etc/apt/sources.list", os.R_OK): f(*args, **kwargs) else: - logging.warn("skipping '%s' because sources.list is not readable" % f) + logging.warning("skipping '%s' because sources.list is not readable" % f) return wrapper @@ -42,7 +42,7 @@ def get_open_file_descriptors(): try: fds = os.listdir("/proc/self/fd") except OSError: - logging.warn("failed to list /proc/self/fd") + logging.warning("failed to list /proc/self/fd") return set([]) return set(map(int, fds)) @@ -122,7 +122,7 @@ class TestAptCache(TestCase): cache = apt.Cache(rootdir="./data/test-provides/") cache.open() if len(cache) == 0: - logging.warn("skipping test_get_provided_packages, cache empty?!?") + logging.warning("skipping test_get_provided_packages, cache empty?!?") return # a true virtual pkg l = cache.get_providing_packages("mail-transport-agent") @@ -135,7 +135,7 @@ class TestAptCache(TestCase): # create highlevel cache and get the lowlevel one from it highlevel_cache = apt.Cache(rootdir="./data/test-provides") if len(highlevel_cache) == 0: - logging.warn("skipping test_log_level_pkg_provides, cache empty?!?") + logging.warning("skipping test_log_level_pkg_provides, cache empty?!?") return # low level cache provides list of the pkg cache = highlevel_cache._cache |
