コード例 #1
0
ファイル: doc_api_examples_tests.py プロジェクト: acx2015/atk
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
ファイル: gendoct.py プロジェクト: KartikKannapur/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
コード例 #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