diff options
Diffstat (limited to 'src/test_aegistests.py')
-rw-r--r-- | src/test_aegistests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test_aegistests.py b/src/test_aegistests.py index af29083..744f141 100644 --- a/src/test_aegistests.py +++ b/src/test_aegistests.py @@ -21,6 +21,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -35,7 +36,6 @@ name of this script doesn't end in *Tests.py. import os import popen2 import re -import string import sys import TestSCons @@ -57,8 +57,8 @@ else: output = get_stdout('aegis -list -unformatted pf') +\ get_stdout('aegis -list -unformatted cf') -lines = string.split(output, '\n')[:-1] -sources = filter(lambda x: x[:7] == 'source ', lines) +lines = output.split('\n')[:-1] +sources = [x for x in lines if x[:7] == 'source '] re1 = re.compile(r' src/.*Tests\.py') re2 = re.compile(r' src/test_.*\.py') @@ -67,11 +67,11 @@ re3 = re.compile(r' test/.*\.py') def filename_is_a_test(x): return re1.search(x) or re2.search(x) or re3.search(x) -test_files = filter(filename_is_a_test, sources) +test_files = list(filter(filename_is_a_test, sources)) if test_files: sys.stderr.write("Found the following files with test names not marked as Aegis tests:\n") - sys.stderr.write('\t' + string.join(test_files, '\n\t') + '\n') + sys.stderr.write('\t' + '\n\t'.join(test_files) + '\n') test.fail_test(1) test.pass_test() |