summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorColin Watson <cjwatson@canonical.com>2012-11-19 13:22:42 +0000
committerColin Watson <cjwatson@canonical.com>2012-11-19 13:22:42 +0000
commita0ecfe1c745e07c41c85b80d747b19179341531d (patch)
treef3a428be5067397aa2585b31890ccd3b949b6f2b /tests
parent386f2f98ac0860d3d34c60127232703fb0122001 (diff)
downloadpython-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')
-rw-r--r--tests/test_apt_cache.py8
-rw-r--r--tests/test_debfile_multiarch.py4
2 files changed, 6 insertions, 6 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
diff --git a/tests/test_debfile_multiarch.py b/tests/test_debfile_multiarch.py
index 7c02a32a..8da070aa 100644
--- a/tests/test_debfile_multiarch.py
+++ b/tests/test_debfile_multiarch.py
@@ -23,7 +23,7 @@ class TestDebfileMultiarch(unittest.TestCase):
def test_multiarch_deb_check(self):
if apt_pkg.get_architectures() != ["amd64", "i386"]:
- logging.warn("skipping test because running on a non-multiarch system")
+ logging.warning("skipping test because running on a non-multiarch system")
return
deb = apt.debfile.DebPackage(
"./data/test_debs/multiarch-test1_i386.deb")
@@ -37,7 +37,7 @@ class TestDebfileMultiarch(unittest.TestCase):
# use "lib3ds-1-3" as a test to see if non-multiach lib conflicts work
canary = "lib3ds-1-3"
if not canary in cache:
- logging.warn("skipping test because %s is missing" % canary)
+ logging.warning("skipping test because %s is missing" % canary)
return
cache[canary].mark_install()
deb = apt.debfile.DebPackage(