[javapackages/python26: 2/2] [artifact] Do not use set comprehension
by Michal Srb
commit 74d60baba1f0b8234082796247564d12834134aa
Author: Michal Srb <msrb(a)redhat.com>
Date: Mon Jun 9 20:34:41 2014 +0200
[artifact] Do not use set comprehension
Set comprehension is not available in python 2.6
python/javapackages/artifact.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/python/javapackages/artifact.py b/python/javapackages/artifact.py
index 33d1583..fb33315 100644
--- a/python/javapackages/artifact.py
+++ b/python/javapackages/artifact.py
@@ -173,7 +173,8 @@ class ProvidedArtifact(object):
compatVersions = set()
if hasattr(metadata, 'compatVersions') and metadata.compatVersions:
- compatVersions = {cv for cv in metadata.compatVersions.version}
+ for cv in metadata.compatVersions.version:
+ compatVersions.add(cv)
aliases = set()
if hasattr(metadata, 'aliases') and metadata.aliases:
9 years, 11 months
[javapackages/python26: 1/2] [test] Try to generate xunit file only with newer nosetests
by Michal Srb
commit f61bb74a4f57730c1d93255713a7701a5792c59e
Author: Michal Srb <msrb(a)redhat.com>
Date: Mon Jun 9 20:31:02 2014 +0200
[test] Try to generate xunit file only with newer nosetests
test/run_tests.sh | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/test/run_tests.sh b/test/run_tests.sh
index 8bdc221..5be3af6 100755
--- a/test/run_tests.sh
+++ b/test/run_tests.sh
@@ -1,6 +1,12 @@
#!/bin/bash
-PYTHONPATH="../python" nosetests --with-xunit --exclude="(maven_prov)|(maven_depmap)|(mvn_artifact)_test.py"
+xunit_param=""
+nose_version=`nosetests --version | awk '{ print $3}' | awk -F'.' '{print $1}'`
+if [[ ${nose_version} -ge 1 ]]; then
+ xunit_param="--with-xunit"
+fi
+
+PYTHONPATH="../python" nosetests ${xunit_param} --exclude="(maven_prov)|(maven_depmap)|(mvn_artifact)_test.py"
r1=$?
r2=0
9 years, 11 months