<commit_before>import py
try:
    import docutils
except ImportError:
    py.test.skip("docutils not present")

from py.__.rest import directive
from py.__.misc import rest
from py.__.rest.latex import process_rest_file

datadir = py.magic.autopath().dirpath().join("data")
testdir = py.test.ensuretemp("rest")

def test_graphviz_html():
    if not py.path.local.sysfind("dot"):
        py.test.skip("graphviz needed")
    directive.set_backend_and_register_directives("html")
    #for reasons that elude me rest.process expects svnwcs???
    if not py.path.local.sysfind("svn"):
        py.test.skip("svn needed")
    txt = py.path.svnwc(datadir.join("graphviz.txt"))
    html = txt.new(ext="html")
    png = datadir.join("example1.png")
    rest.process(txt)
    assert html.check()<commit_msg>[svn r38110] i don't think one needs to use svnwc's anymore, at least it works for me, i think.<commit_after>import py
try:
    import docutils
except ImportError:
    py.test.skip("docutils not present")

from py.__.rest import directive
from py.__.misc import rest
from py.__.rest.latex import process_rest_file

datadir = py.magic.autopath().dirpath().join("data")
testdir = py.test.ensuretemp("rest")

def test_graphviz_html():
    if not py.path.local.sysfind("dot"):
        py.test.skip("graphviz needed")
    directive.set_backend_and_register_directives("html")
    if not py.path.local.sysfind("svn"):
        py.test.skip("svn needed")
    txt = datadir.join("graphviz.txt")
    html = txt.new(ext="html")
    png = datadir.join("example1.png")
    rest.process(txt)
    assert html.check()
{'fraction_non_alphanumeric': 0.13650594865372573, 'fraction_numerical': 0.004383218534752661, 'mean_word_length': 3.9473684210526314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5755252', 'n_tokens_mistral': 558, 'n_tokens_neox': 545, 'n_words': 121}