summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--tests/test_all.py4
2 files changed, 10 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 72cb6289..681ce97d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-apt (0.8.0ubuntu2) oneiric; urgency=low
+
+ * disable tests if /etc/apt/sources.list is not readable
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 08 Aug 2011 18:51:50 +0200
+
python-apt (0.8.0ubuntu1) oneiric; urgency=low
[ Julian Andres Klode ]
diff --git a/tests/test_all.py b/tests/test_all.py
index 091581f8..f7b9dc8c 100644
--- a/tests/test_all.py
+++ b/tests/test_all.py
@@ -34,6 +34,10 @@ def get_library_dir():
return os.path.abspath(library_dir)
if __name__ == '__main__':
+ if not os.access("/etc/apt/sources.list", os.R_OK):
+ sys.stderr.write("[tests] Skipping because sources.list is not readable\n")
+ sys.exit(0)
+
sys.stderr.write("[tests] Running on %s\n" % sys.version.replace("\n", ""))
dirname = os.path.dirname(__file__)
if dirname: