Skip to content
Snippets Groups Projects
Commit c22955d1 authored by Raniere Silva's avatar Raniere Silva
Browse files

Merge pull request #110 from abought/check_py

Make validator imports more pythonic
parents fab53323 d1378e3a
Branches
Tags
No related merge requests found
......@@ -20,21 +20,7 @@ import os
import re
import sys
try:
# Code tested with CommonMark version 0.5.4; API may change
import CommonMark
except ImportError:
ERROR_MESSAGE = """This program requires the CommonMark python package.
Install using
# pip install commonmark
or
# easy_install commonmark
"""
print(ERROR_MESSAGE)
sys.exit(1)
import CommonMark
import validation_helpers as vh
......
......@@ -7,14 +7,11 @@ Some of these tests require looking for example files, which exist only on
the gh-pages branch. Some tests may therefore fail on branch "core".
"""
import imp
import logging
import os
import unittest
check = imp.load_source("check", # Import non-.py file
os.path.join(os.path.dirname(__file__), "check"))
import check
# Make log messages visible to help audit test failures
check.start_logging(level=logging.DEBUG)
......
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