summaryrefslogtreecommitdiff
path: root/src/test_aegistests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/test_aegistests.py')
-rw-r--r--src/test_aegistests.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test_aegistests.py b/src/test_aegistests.py
index dc160f3..919c621 100644
--- a/src/test_aegistests.py
+++ b/src/test_aegistests.py
@@ -20,9 +20,8 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-__revision__ = "src/test_aegistests.py 4720 2010/03/24 03:14:11 jars"
+__revision__ = "src/test_aegistests.py 5023 2010/06/14 22:05:46 scons"
"""
Verify that we have proper Copyright notices on all the right files
@@ -35,7 +34,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 +55,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 +65,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()