From 4983de60d3c587f1f9643a7c3595ba5109d71dd3 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 11 Jun 2018 23:32:49 -0300 Subject: [PATCH] Remove unused scripts from docs --- doc/en/check_sphinx.py | 17 ---------------- doc/en/genapi.py | 44 ------------------------------------------ 2 files changed, 61 deletions(-) delete mode 100644 doc/en/check_sphinx.py delete mode 100644 doc/en/genapi.py diff --git a/doc/en/check_sphinx.py b/doc/en/check_sphinx.py deleted file mode 100644 index af609624b..000000000 --- a/doc/en/check_sphinx.py +++ /dev/null @@ -1,17 +0,0 @@ -import subprocess - - -def test_build_docs(tmpdir): - doctrees = tmpdir.join("doctrees") - htmldir = tmpdir.join("html") - subprocess.check_call( - ["sphinx-build", "-W", "-bhtml", "-d", str(doctrees), ".", str(htmldir)] - ) - - -def test_linkcheck(tmpdir): - doctrees = tmpdir.join("doctrees") - htmldir = tmpdir.join("html") - subprocess.check_call( - ["sphinx-build", "-blinkcheck", "-d", str(doctrees), ".", str(htmldir)] - ) diff --git a/doc/en/genapi.py b/doc/en/genapi.py deleted file mode 100644 index edbf49f2c..000000000 --- a/doc/en/genapi.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import print_function -import textwrap -import inspect - - -class Writer(object): - - def __init__(self, clsname): - self.clsname = clsname - - def __enter__(self): - self.file = open("%s.api" % self.clsname, "w") - return self - - def __exit__(self, *args): - self.file.close() - print("wrote", self.file.name) - - def line(self, line): - self.file.write(line + "\n") - - def docmethod(self, method): - doc = " ".join(method.__doc__.split()) - indent = " " - w = textwrap.TextWrapper(initial_indent=indent, subsequent_indent=indent) - - spec = inspect.getargspec(method) - del spec.args[0] - self.line(".. py:method:: " + method.__name__ + inspect.formatargspec(*spec)) - self.line("") - self.line(w.fill(doc)) - self.line("") - - -def pytest_funcarg__a(request): - with Writer("request") as writer: - writer.docmethod(request.getfixturevalue) - writer.docmethod(request.cached_setup) - writer.docmethod(request.addfinalizer) - writer.docmethod(request.applymarker) - - -def test_hello(a): - pass