aboutsummaryrefslogtreecommitdiffstats
path: root/tests/__init__.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2011-07-28 10:59:25 -0400
committerWaylan Limberg <waylan@gmail.com>2011-07-28 10:59:25 -0400
commitfbc96ca158193c3e692fd5876480cf4927da151a (patch)
tree0f2577fff65b0d10b72118f4980aa1be7d768384 /tests/__init__.py
parentaf74ff4dd4ca93f63cdf0a9d7dc8b1258f13fe1a (diff)
downloadmarkdown-fbc96ca158193c3e692fd5876480cf4927da151a.tar.gz
markdown-fbc96ca158193c3e692fd5876480cf4927da151a.tar.bz2
markdown-fbc96ca158193c3e692fd5876480cf4927da151a.zip
Python 3.2 made some changes to the configparser which broke the testing framework. With a simple addition to our subclass (which we then make use of), this is an easy fix.
Diffstat (limited to 'tests/__init__.py')
-rw-r--r--tests/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/__init__.py b/tests/__init__.py
index 3cc90b7..99eae44 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -73,18 +73,18 @@ class CheckSyntax(object):
def __call__(self, file, config):
""" Compare expected output to actual output and report result. """
cfg_section = get_section(file, config)
- if config.getboolean(cfg_section, 'skip'):
+ if config.get(cfg_section, 'skip'):
raise nose.plugins.skip.SkipTest, 'Test skipped per config.'
input_file = file + config.get(cfg_section, 'input_ext')
input = codecs.open(input_file, encoding="utf-8").read()
output_file = file + config.get(cfg_section, 'output_ext')
expected_output = codecs.open(output_file, encoding="utf-8").read()
output = markdown.markdown(input, **get_args(file, config))
- if tidy and config.getboolean(cfg_section, 'normalize'):
+ if tidy and config.get(cfg_section, 'normalize'):
# Normalize whitespace before comparing.
expected_output = normalize(expected_output)
output = normalize(output)
- elif config.getboolean(cfg_section, 'normalize'):
+ elif config.get(cfg_section, 'normalize'):
# Tidy is not available. Skip this test.
raise nose.plugins.skip.SkipTest, 'Test skipped. Tidy not available in system.'
diff = [l for l in difflib.unified_diff(expected_output.splitlines(True),