diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-02-13 16:41:39 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-02-13 16:41:39 +0100 |
| commit | dadba850a99f4ae87ac0a7a89b60bae849d76306 (patch) | |
| tree | e65f89369a72fec4e9a63e579ccc526380e4db18 /tests/test_aptsources_ports.py | |
| parent | f594f8f2b8e90717ccbdcc3d17ada3c7d0e9163a (diff) | |
| download | python-apt-dadba850a99f4ae87ac0a7a89b60bae849d76306.tar.gz | |
* tests:
- Fix aptsources tests to use local data files if available.
Diffstat (limited to 'tests/test_aptsources_ports.py')
| -rw-r--r-- | tests/test_aptsources_ports.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_aptsources_ports.py b/tests/test_aptsources_ports.py index f837585b..991b532a 100644 --- a/tests/test_aptsources_ports.py +++ b/tests/test_aptsources_ports.py @@ -18,11 +18,15 @@ class TestAptSourcesPorts(unittest.TestCase): apt_pkg.config.set("Dir::Etc", os.path.abspath("data/aptsources_ports")) apt_pkg.config.set("Dir::Etc::sourceparts", "/xxx") + if os.path.exists("../build/data/templates"): + self.templates = os.path.abspath("../build/data/templates") + else: + self.templates = "/usr/share/python-apt/templates/" def testMatcher(self): """aptsources_ports: Test matcher.""" apt_pkg.config.set("Dir::Etc::sourcelist", "sources.list") - sources = aptsources.sourceslist.SourcesList() + sources = aptsources.sourceslist.SourcesList(True, self.templates) distro = aptsources.distro.get_distro("Ubuntu", "hardy", "desc", "8.04") distro.get_sources(sources) |
