# Path: henet/rst/parse.py
# def parse_article(filename, destination=None):
#     settings = OptionParser(components=(Parser,)).get_default_values()
#     pub = core.Publisher(None, None, None, settings=settings)
#     pub.set_components('standalone', 'restructuredtext', 'html')
#     pub.writer = Writer()
#     pub.set_source(None, filename)
# 
#     if destination is not None:
#         pub.set_destination(None, destination)
#     else:
#         pub.destination_class = io.NullOutput
#         pub.set_destination(None, None)
# 
#     pub.process_programmatic_settings(None, None, None)
#     try:
#         pub.publish()
#     except SystemExit as e:
#         article = pub.writer.visitor.article
#         with open(filename) as f:
#             article.original_source = f.read()
# 
#     return pub.writer.visitor.article


import os
import unittest
from henet.rst.parse import parse_article
from Levenshtein import distance, jaro



SAMPLE_DIR = os.path.join(os.path.dirname(__file__), 'samples')
MUTATED_FILES = [
    '2013-05-06-rotarienne.rst', '2013-05-13-traildesforts.rst',
    '2013-05-26-2207-maxi-race-2013.rst', '2013-06-11-utco.rst',
    '2013-06-20-0022-trail-du-mont-dor.rst',
    '2013-06-26-1230-organisation-ronde-des-etangs-30-juin-2013.rst',
    '2013-07-12-0836-resultats-du-week-end.rst',
    '2013-07-27-1455-compte-rendu-de-julien-harson-sur-litt.rst',

# Path: henet/rst/parse.py
# def parse_article(filename, destination=None):
#     settings = OptionParser(components=(Parser,)).get_default_values()
#     pub = core.Publisher(None, None, None, settings=settings)
#     pub.set_components('standalone', 'restructuredtext', 'html')
#     pub.writer = Writer()
#     pub.set_source(None, filename)
# 
#     if destination is not None:
#         pub.set_destination(None, destination)
#     else:
#         pub.destination_class = io.NullOutput
#         pub.set_destination(None, None)
# 
#     pub.process_programmatic_settings(None, None, None)
#     try:
#         pub.publish()
#     except SystemExit as e:
#         article = pub.writer.visitor.article
#         with open(filename) as f:
#             article.original_source = f.read()
# 
#     return pub.writer.visitor.article


# Path: henet/tests/test_rst.py
import os
import unittest
from henet.rst.parse import parse_article
from Levenshtein import distance, jaro




SAMPLE_DIR = os.path.join(os.path.dirname(__file__), 'samples')
MUTATED_FILES = [
    '2013-05-06-rotarienne.rst', '2013-05-13-traildesforts.rst',
    '2013-05-26-2207-maxi-race-2013.rst', '2013-06-11-utco.rst',
    '2013-06-20-0022-trail-du-mont-dor.rst',
    '2013-06-26-1230-organisation-ronde-des-etangs-30-juin-2013.rst',
    '2013-07-12-0836-resultats-du-week-end.rst',
    '2013-07-27-1455-compte-rendu-de-julien-harson-sur-litt.rst',

    '2013-11-12-sparnatrail.rst',