예제 #1
0
def add_doctest_file(full_path):
    """parses the file at the given path and adds it to the test list for doctest"""
    with open(full_path) as f:
        content = f.read()
    cleansed = parse_for_doctest(content)
    # print "Adding content for %s" % full_path
    doctests_module.__test__[full_path] = cleansed
예제 #2
0
def add_doctest_file(full_path):
    """parses the file at the given path and adds it to the test list for doctest"""
    with open(full_path) as f:
        content = f.read()
    cleansed = parse_for_doctest(content)
    # print "Adding content for %s" % full_path
    doctests_module.__test__[full_path] = cleansed
예제 #3
0
def _get_cleansed_test_text(full_path):
    """parses the file at the given path and returns a cleansed string of its test content"""
    with open(full_path) as test_file:
        content = test_file.read()
    cleansed = parse_for_doctest(content)
    return cleansed
예제 #4
0
파일: gendoct.py 프로젝트: tlisonbee/atk
def _get_cleansed_test_text(full_path):
    """parses the file at the given path and returns a cleansed string of its test content"""
    with open(full_path) as test_file:
        content = test_file.read()
    cleansed = parse_for_doctest(content)
    return cleansed