summaryrefslogtreecommitdiff
path: root/test/Java
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-11 13:03:23 -0800
committerCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-11 13:03:23 -0800
commitdbcd820bd18181ff5090b5e49e99c22f926bd9ec (patch)
tree8757cec005be0367866f27f1a9265adbf5def009 /test/Java
parentcf5b5b840547e7faa8289ef4999424699d5948d1 (diff)
downloadscons-dbcd820bd18181ff5090b5e49e99c22f926bd9ec.tar.gz
Replace list(filter()) with list comprehension.
Diffstat (limited to 'test/Java')
-rw-r--r--test/Java/Java-1.4.py2
-rw-r--r--test/Java/Java-1.5.py2
-rw-r--r--test/Java/Java-1.6.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/Java/Java-1.4.py b/test/Java/Java-1.4.py
index c1eb5e52..40767838 100644
--- a/test/Java/Java-1.4.py
+++ b/test/Java/Java-1.4.py
@@ -350,7 +350,7 @@ def classes_must_match(dir, expect):
def classes_must_not_exist(dir, expect):
global failed
- present = list(filter(os.path.exists, expect))
+ present = [path for path in expect if os.path.exists(path)]
if present:
sys.stderr.write("Found the following unexpected class files in '%s' after cleaning:\n" % dir)
for c in present:
diff --git a/test/Java/Java-1.5.py b/test/Java/Java-1.5.py
index 0f93a008..6659a16b 100644
--- a/test/Java/Java-1.5.py
+++ b/test/Java/Java-1.5.py
@@ -346,7 +346,7 @@ def classes_must_match(dir, expect):
def classes_must_not_exist(dir, expect):
global failed
- present = list(filter(os.path.exists, expect))
+ present = [path for path in expect if os.path.exists(path)]
if present:
sys.stderr.write("Found the following unexpected class files in '%s' after cleaning:\n" % dir)
for c in present:
diff --git a/test/Java/Java-1.6.py b/test/Java/Java-1.6.py
index bd7a48f6..be46919c 100644
--- a/test/Java/Java-1.6.py
+++ b/test/Java/Java-1.6.py
@@ -346,7 +346,7 @@ def classes_must_match(dir, expect):
def classes_must_not_exist(dir, expect):
global failed
- present = list(filter(os.path.exists, expect))
+ present = [path for path in expect if os.path.exists(path)]
if present:
sys.stderr.write("Found the following unexpected class files in '%s' after cleaning:\n" % dir)
for c in present: