diff options
author | C Nelson <cnelsonsic@gmail.com> | 2012-04-06 12:11:40 -0500 |
---|---|---|
committer | C Nelson <cnelsonsic@gmail.com> | 2012-04-06 12:11:40 -0500 |
commit | 8dc750b1e4c3882edb42f88c72a148275c9355b8 (patch) | |
tree | fd54efbd59c15fb25bdbb91fc75d342327f83c0a /extras/crystal.py | |
parent | 4de0c12b438cf99e90070e723508ce636278e063 (diff) |
Adding a real check for unittest2 features.
Diffstat (limited to 'extras/crystal.py')
-rw-r--r-- | extras/crystal.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extras/crystal.py b/extras/crystal.py index d303c9dfd..95b326dcd 100644 --- a/extras/crystal.py +++ b/extras/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 |