summaryrefslogtreecommitdiff
path: root/crystal.py
diff options
context:
space:
mode:
authorC Nelson <cnelsonsic@gmail.com>2012-04-06 12:11:40 -0500
committerC Nelson <cnelsonsic@gmail.com>2012-04-06 12:11:40 -0500
commitcf9d55b81131cc6d037a7f6fe892d0d995783281 (patch)
treed66faf6ee62ab1f72fdfba7bdbc217b6a7fb18ff /crystal.py
parent721751dd57ba8d257cdafd00d747ede6742bc5a9 (diff)
Adding a real check for unittest2 features.
original-commit-id: 8dc750b1e4c3882edb42f88c72a148275c9355b8
Diffstat (limited to 'crystal.py')
-rw-r--r--crystal.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/crystal.py b/crystal.py
index d303c9d..95b326d 100644
--- a/crystal.py
+++ b/crystal.py
@@ -16,6 +16,11 @@ try:
except ImportError:
import unittest
+# Check for things we need in unittest.
+if not hasattr(unittest.TestCase, 'setUpClass'):
+ print "The unittest2 module or Python 2.7 is required to run this script."
+ sys.exit(1)
+
if not hasattr(json, "dumps"):
json.dumps = json.write