Commit 844ebdbc by Chris Jerdonek

Cleaned up code comments in previous commit.

parent 6252e693
......@@ -11,16 +11,18 @@ FILE_ENCODING = 'utf-8' # the encoding of the spec test files.
try:
# We try yaml first since it is more convenient when adding and modifying
# test cases by hand (since the YAML is human-readable and is the master
# from which the JSON format is generated).
import yaml
except ImportError:
try:
# We use the JSON files rather than the YAML files because json libraries
# are available for Python 2.4.
import json
except:
# The module json is not available prior to Python 2.6, whereas simplejson is.
# Note that simplejson dropped support for Python 2.4 in simplejson v2.1.0,
# so Python 2.4 requires a simplejson install older than the most recent.
# The module json is not available prior to Python 2.6, whereas
# simplejson is. The simplejson package dropped support for Python 2.4
# in simplejson v2.1.0, so Python 2.4 requires a simplejson install
# older than the most recent version.
import simplejson as json
file_extension = 'json'
parser = json
......@@ -48,7 +50,7 @@ def parse(u, file_extension):
u: a unicode string.
"""
# Find a cleaner mechanism for choosing between the two.
# TODO: find a cleaner mechanism for choosing between the two.
if file_extension[0] == 'j':
# Then json.
......@@ -75,7 +77,6 @@ def parse(u, file_extension):
return yaml.load(u)
# This test case lets us alert the user that spec tests are missing.
class CheckSpecTestsFound(unittest.TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment