diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-08 18:54:01 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-08 18:54:01 +0200 |
| commit | cd5e6765f2403db4f90b08a3f42841565710f65f (patch) | |
| tree | e2bd3671a058794b63e82e04d05fac31bd8a7164 | |
| parent | 68860341da1d5e328b66e85f7fdbdc8f54748cb9 (diff) | |
| download | python-apt-cd5e6765f2403db4f90b08a3f42841565710f65f.tar.gz | |
skip tests if sources.list is not readable
| -rw-r--r-- | tests/test_all.py | 4 |
1 files changed, 4 insertions, 0 deletions
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: |
