move and rename html rest helper to rest directory - finally remove py/misc completely

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-08-25 16:15:17 +02:00
parent e810e1774d
commit 94aef0b771
9 changed files with 11 additions and 15 deletions

View File

@ -1,5 +1,5 @@
import py
from py.__.misc.rest import convert_rest_html, strip_html_header
from py.__.rest.resthtml import convert_rest_html, strip_html_header
html = py.xml.html

View File

@ -36,8 +36,7 @@ parser.add_option("--debug", action="store_true", dest="debug",
def main():
try:
from py.__.misc import rest
from py.__.rest import directive
from py.__.rest import directive, resthtml
from py.__.rest.latex import process_rest_file, process_configfile
except ImportError, e:
print str(e)
@ -63,7 +62,7 @@ def main():
return p.check(dotfile=0)
if p.check(dir=1):
for x in p.visit(fil, rec):
rest.process(x)
resthtml.process(x)
elif p.check(file=1):
if p.ext == ".rst2pdfconfig":
directive.set_backend_and_register_directives("latex")
@ -79,5 +78,5 @@ def main():
options.stylesheet,
options.debug)
else:
rest.process(p)
resthtml.process(p)

View File

@ -1 +0,0 @@
#

View File

@ -1 +0,0 @@
#

View File

@ -2,8 +2,7 @@ import py
from py.__.rest.testing.setup import getdata
docutils = py.test.importorskip("docutils")
from py.__.rest import directive
from py.__.misc import rest
from py.__.rest import directive, resthtml
from py.__.rest.latex import process_rest_file
def setup_module(mod):
@ -20,7 +19,7 @@ class TestGraphviz(object):
txt = datadir.join("graphviz.txt")
html = txt.new(ext="html")
png = datadir.join("example1.png")
rest.process(txt)
resthtml.process(txt)
assert html.check()
assert png.check()
html_content = html.read()
@ -57,7 +56,7 @@ def test_own_links():
:foo:`whatever`
""")
html = txt.new(ext="html")
rest.process(txt)
resthtml.process(txt)
assert html.check()
htmlcontent = html.read()
assert "http://codespeak.net/noclue" in htmlcontent

View File

@ -1,7 +1,7 @@
from __future__ import generators
import py
from py.__.misc import rest
from py.__.rest import resthtml
from py.__.rest.testing.setup import getdata
@ -18,5 +18,5 @@ def test_process_simple():
def rec(p):
return p.check(dotfile=0)
for x in datadir.visit("*.txt", rec=rec):
yield rest.process, x
yield resthtml.process, x

View File

@ -4,7 +4,7 @@
import py
py.test.importorskip("docutils")
from py.__.rest.rst import *
from py.__.misc.rest import process as restcheck
from py.__.rest.resthtml import process as restcheck
import traceback
tempdir = py.test.ensuretemp('rest')

View File

@ -397,7 +397,7 @@ class TestDoctest:
def pytest_funcarg__testdir(self, request):
testdir = request.getfuncargvalue("testdir")
assert request.module.__name__ == __name__
testdir.makepyfile(confrest="from py.__.misc.rest import Project")
testdir.makepyfile(confrest="from py.__.rest.resthtml import Project")
for p in testdir.plugins:
if p == globals():
break