~ubuntu-branches/ubuntu/raring/python-apt/raring-proposed

« back to all changes in this revision

Viewing changes to tests/test_apt_cache.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-11-20 12:01:08 UTC
  • Revision ID: package-import@ubuntu.com-20121120120108-l6o2iqx9cvtvsdt2
Tags: 0.8.8ubuntu5
* tests/*.py: Do not prepend None to sys.path, Python 3.3 redeems that with
  an unintelligible crash.
* tests/test_auth.py: In test_add_key_from_server_mitm(), show the exception
  if it does not match the expectation, so that this becomes possible to
  debug.
* aptsources/distro.py: Replace the deprecated getiterator() ElementTree
  method with iter(), to avoid raising a PendingDeprecationWarning.
* tests/test_auth.py: Temporarily disable $http_proxy for the tests, as
  gnupg does not get along with proxies (LP #789049)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
 
25
25
from test_all import get_library_dir
26
 
sys.path.insert(0, get_library_dir())
 
26
libdir = get_library_dir()
 
27
if libdir:
 
28
    sys.path.insert(0, libdir)
27
29
 
28
30
import apt
29
31
import apt_pkg