summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-08-17 16:48:22 -0700
committerZac Medico <zmedico@gentoo.org>2012-08-17 16:57:44 -0700
commit205f3f187a94a6d297fa1a9d474b839203b09a7d (patch)
treee9fc454f43a6a3a3eb277b00dd8251ba2f299cce /pym
parent44b0faa3b84c1fd39ef72f58677ed3bcd6c82109 (diff)
downloadportage-205f3f187a94a6d297fa1a9d474b839203b09a7d.tar.gz
portage-205f3f187a94a6d297fa1a9d474b839203b09a7d.tar.bz2
portage-205f3f187a94a6d297fa1a9d474b839203b09a7d.zip
BashSyntaxTestCase: include new misc dir
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/tests/lint/test_bash_syntax.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/pym/portage/tests/lint/test_bash_syntax.py b/pym/portage/tests/lint/test_bash_syntax.py
index aef8d74f1..3acea6619 100644
--- a/pym/portage/tests/lint/test_bash_syntax.py
+++ b/pym/portage/tests/lint/test_bash_syntax.py
@@ -1,9 +1,10 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+from itertools import chain
import stat
-from portage.const import BASH_BINARY, PORTAGE_BIN_PATH
+from portage.const import BASH_BINARY, PORTAGE_BASE_PATH, PORTAGE_BIN_PATH
from portage.tests import TestCase
from portage import os
from portage import subprocess_getstatusoutput
@@ -14,7 +15,12 @@ from portage import _unicode_decode, _unicode_encode
class BashSyntaxTestCase(TestCase):
def testBashSyntax(self):
- for parent, dirs, files in os.walk(PORTAGE_BIN_PATH):
+ locations = [PORTAGE_BIN_PATH]
+ misc_dir = os.path.join(PORTAGE_BASE_PATH, "misc")
+ if os.path.isdir(misc_dir):
+ locations.append(misc_dir)
+ for parent, dirs, files in \
+ chain.from_iterable(os.walk(x) for x in locations):
parent = _unicode_decode(parent,
encoding=_encodings['fs'], errors='strict')
for x in files: