1 |
commit: b61bee7bf4658940147cba1d7ed0dfbeb1a49696 |
2 |
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 30 02:57:32 2014 +0000 |
4 |
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 30 02:57:36 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=b61bee7b |
7 |
|
8 |
external.py: Adds archive overlay test checking |
9 |
|
10 |
A test has been added to ensure we only test the archive overlay |
11 |
types that the user has installed on their system. |
12 |
|
13 |
--- |
14 |
layman/tests/external.py | 11 ++++++++++- |
15 |
1 file changed, 10 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/layman/tests/external.py b/layman/tests/external.py |
18 |
index 1aceca6..64f48d2 100755 |
19 |
--- a/layman/tests/external.py |
20 |
+++ b/layman/tests/external.py |
21 |
@@ -194,7 +194,16 @@ class ArchiveAddRemoveSync(unittest.TestCase): |
22 |
|
23 |
|
24 |
def test(self): |
25 |
- for archive in ('squashfs', 'tar'): |
26 |
+ archives = [] |
27 |
+ try: |
28 |
+ from layman.overlays.modules.tar.tar import TarOverlay |
29 |
+ archives.append('tar') |
30 |
+ from layman.overlays.modules.squashfs.squashfs import SquashfsOverlay |
31 |
+ archives.append('squashfs') |
32 |
+ except ImportError: |
33 |
+ pass |
34 |
+ |
35 |
+ for archive in archives: |
36 |
xml_text, repo_name, temp_archive_path = getattr(self, |
37 |
"_create_%(archive)s_overlay" % |
38 |
{'archive': archive})() |