summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-07-13 18:37:48 +0000
committerTodd Gamblin <tgamblin@llnl.gov>2015-07-13 18:37:48 +0000
commit9d1f8f6bfd59cf2e083276ef095618f8545c5167 (patch)
treeeca4107d6c24fc7eada7788106b30401ea55c746 /lib
parent6f8a4318c5f21fbfe26b7d8af8fec586e4015559 (diff)
downloadspack-9d1f8f6bfd59cf2e083276ef095618f8545c5167.tar.gz
spack-9d1f8f6bfd59cf2e083276ef095618f8545c5167.tar.bz2
spack-9d1f8f6bfd59cf2e083276ef095618f8545c5167.tar.xz
spack-9d1f8f6bfd59cf2e083276ef095618f8545c5167.zip
Add test to check packages for Python2.6 compatibility, as well as core.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/python_version.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/spack/spack/test/python_version.py b/lib/spack/spack/test/python_version.py
index 06d87e11ad..5b803b4cf3 100644
--- a/lib/spack/spack/test/python_version.py
+++ b/lib/spack/spack/test/python_version.py
@@ -56,11 +56,16 @@ class PythonVersionTest(unittest.TestCase):
yield os.path.join(root, filename)
- def test_python_versions(self):
+ def all_package_py_files(self):
+ for name in spack.db.all_package_names():
+ yield spack.db.filename_for_package_name(name)
+
+
+ def check_python_versions(self, files):
# dict version -> filename -> reasons
all_issues = {}
- for fn in self.spack_python_files():
+ for fn in files:
with open(fn) as pyfile:
versions = pyqver2.get_versions(pyfile.read())
for ver, reasons in versions.items():
@@ -93,3 +98,11 @@ class PythonVersionTest(unittest.TestCase):
print fmt % msg
self.assertTrue(len(all_issues) == 0)
+
+
+ def test_core_module_compatibility(self):
+ self.check_python_versions(self.spack_python_files())
+
+
+ def test_package_module_compatibility(self):
+ self.check_python_versions(self.all_package_py_files())