summaryrefslogtreecommitdiffstats
path: root/src/test_aegistests.py
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 (GMT)
commit22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch)
tree0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /src/test_aegistests.py
parent75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff)
downloadSCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.zip
SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.gz
SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.bz2
Move 2.0 changes collected in branches/pending back to trunk for further
development. Note that this set of changes is NOT backward-compatible; the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
Diffstat (limited to 'src/test_aegistests.py')
-rw-r--r--src/test_aegistests.py10
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()