summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/roots/test-add_enumerable_node/conf.py2
-rw-r--r--tests/roots/test-add_enumerable_node/enumerable_node.py2
-rw-r--r--tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py2
-rw-r--r--tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py2
-rw-r--r--tests/roots/test-add_source_parser/conf.py2
-rw-r--r--tests/roots/test-add_source_parser/source_parser.py2
-rw-r--r--tests/roots/test-api-set-translator/conf.py1
-rw-r--r--tests/roots/test-api-set-translator/nonext/conf.py2
-rw-r--r--tests/roots/test-api-set-translator/translator.py2
-rw-r--r--tests/roots/test-basic/conf.py2
-rw-r--r--tests/roots/test-build-html-translator/conf.py2
-rw-r--r--tests/roots/test-build-htmlhelp/conf.py2
-rw-r--r--tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py2
-rw-r--r--tests/roots/test-default_role/conf.py2
-rw-r--r--tests/roots/test-directive-code/conf.py2
-rw-r--r--tests/roots/test-directive-code/literal-diff.inc1
-rw-r--r--tests/roots/test-directive-code/literal.inc1
-rw-r--r--tests/roots/test-directive-code/py-decorators.inc1
-rw-r--r--tests/roots/test-directive-code/target.py1
-rw-r--r--tests/roots/test-directives-raw/conf.py2
-rw-r--r--tests/roots/test-docutilsconf/conf.py2
-rw-r--r--tests/roots/test-domain-cpp/conf.py2
-rw-r--r--tests/roots/test-domain-js/conf.py2
-rw-r--r--tests/roots/test-domain-py/conf.py2
-rw-r--r--tests/roots/test-double-inheriting-theme/conf.py2
-rw-r--r--tests/roots/test-epub-anchor-id/conf.py2
-rw-r--r--tests/roots/test-ext-autodoc/target/__init__.py2
-rw-r--r--tests/roots/test-ext-autosectionlabel-prefix-document/conf.py2
-rw-r--r--tests/roots/test-ext-autosectionlabel/conf.py2
-rw-r--r--tests/roots/test-ext-githubpages/conf.py2
-rw-r--r--tests/roots/test-ext-graphviz/conf.py2
-rw-r--r--tests/roots/test-ext-ifconfig/conf.py2
-rw-r--r--tests/roots/test-ext-imgconverter/conf.py2
-rw-r--r--tests/roots/test-ext-inheritance_diagram/conf.py2
-rw-r--r--tests/roots/test-ext-inheritance_diagram/test.py3
-rw-r--r--tests/roots/test-ext-intersphinx-cppdomain/conf.py2
-rw-r--r--tests/roots/test-ext-math-compat/conf.py2
-rw-r--r--tests/roots/test-ext-math-simple/conf.py2
-rw-r--r--tests/roots/test-ext-math/conf.py2
-rw-r--r--tests/roots/test-ext-todo/conf.py2
-rw-r--r--tests/roots/test-ext-viewcode-find/conf.py2
-rw-r--r--tests/roots/test-ext-viewcode/conf.py2
-rw-r--r--tests/roots/test-footnotes/conf.py2
-rw-r--r--tests/roots/test-gettext-template/conf.py2
-rw-r--r--tests/roots/test-glossary/conf.py2
-rw-r--r--tests/roots/test-html_assets/conf.py2
-rw-r--r--tests/roots/test-html_entity/conf.py2
-rw-r--r--tests/roots/test-image-in-parsed-literal/conf.py2
-rw-r--r--tests/roots/test-image-in-section/conf.py2
-rw-r--r--tests/roots/test-images/conf.py2
-rw-r--r--tests/roots/test-intl/conf.py2
-rw-r--r--tests/roots/test-keep_warnings/conf.py2
-rw-r--r--tests/roots/test-latex-babel/conf.py2
-rw-r--r--tests/roots/test-latex-equations/conf.py2
-rw-r--r--tests/roots/test-latex-index/conf.py2
-rw-r--r--tests/roots/test-latex-labels/conf.py2
-rw-r--r--tests/roots/test-latex-numfig/conf.py2
-rw-r--r--tests/roots/test-latex-table/conf.py2
-rw-r--r--tests/roots/test-latex-title/conf.py2
-rw-r--r--tests/roots/test-manpage_url/conf.py2
-rw-r--r--tests/roots/test-markup-citation/conf.py2
-rw-r--r--tests/roots/test-markup-rubric/conf.py2
-rw-r--r--tests/roots/test-maxlistdepth/conf.py2
-rw-r--r--tests/roots/test-metadata/conf.py2
-rw-r--r--tests/roots/test-need-escaped/conf.py2
-rw-r--r--tests/roots/test-nested-enumerated-list/conf.py2
-rw-r--r--tests/roots/test-numfig/conf.py2
-rw-r--r--tests/roots/test-prolog/conf.py2
-rw-r--r--tests/roots/test-prolog/prolog_markdown_parser.py2
-rw-r--r--tests/roots/test-pycode-egg/conf.py2
-rw-r--r--tests/roots/test-pycode-egg/src/sample.py2
-rw-r--r--tests/roots/test-pycode-egg/src/setup.py1
-rw-r--r--tests/roots/test-refonly_bullet_list/conf.py2
-rw-r--r--tests/roots/test-roles-download/conf.py2
-rw-r--r--tests/roots/test-root/autodoc_target.py2
-rw-r--r--tests/roots/test-root/conf.py2
-rw-r--r--tests/roots/test-root/literal_orig.inc1
-rw-r--r--tests/roots/test-setup/doc/conf.py2
-rw-r--r--tests/roots/test-smartquotes/conf.py2
-rw-r--r--tests/roots/test-stylesheets/conf.py2
-rw-r--r--tests/roots/test-templating/conf.py2
-rw-r--r--tests/roots/test-theming/conf.py2
-rw-r--r--tests/roots/test-theming/setup.py3
-rw-r--r--tests/roots/test-theming/test_theme/__init__.py1
-rw-r--r--tests/roots/test-tocdepth/conf.py2
-rw-r--r--tests/roots/test-toctree-empty/conf.py2
-rw-r--r--tests/roots/test-toctree-glob/conf.py2
-rw-r--r--tests/roots/test-toctree-maxdepth/conf.py2
-rw-r--r--tests/roots/test-toctree/conf.py2
-rw-r--r--tests/roots/test-trim_doctest_flags/conf.py2
-rw-r--r--tests/roots/test-warnings/conf.py2
-rw-r--r--tests/test_config.py4
-rw-r--r--tests/test_directive_code.py45
93 files changed, 22 insertions, 203 deletions
diff --git a/tests/roots/test-add_enumerable_node/conf.py b/tests/roots/test-add_enumerable_node/conf.py
index a4801f6bb..3840666ce 100644
--- a/tests/roots/test-add_enumerable_node/conf.py
+++ b/tests/roots/test-add_enumerable_node/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-add_enumerable_node/enumerable_node.py b/tests/roots/test-add_enumerable_node/enumerable_node.py
index 1338c9125..782365e65 100644
--- a/tests/roots/test-add_enumerable_node/enumerable_node.py
+++ b/tests/roots/test-add_enumerable_node/enumerable_node.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
from docutils import nodes
from docutils.parsers.rst import Directive
diff --git a/tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py b/tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py
index 00a5a7039..3ad549153 100644
--- a/tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py
+++ b/tests/roots/test-add_source_parser-conflicts-with-users-setting/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py b/tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py
index 69898ed91..69ad02db0 100644
--- a/tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py
+++ b/tests/roots/test-add_source_parser-conflicts-with-users-setting/source_parser.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
from docutils.parsers import Parser
diff --git a/tests/roots/test-add_source_parser/conf.py b/tests/roots/test-add_source_parser/conf.py
index eface21e8..9ff50b21e 100644
--- a/tests/roots/test-add_source_parser/conf.py
+++ b/tests/roots/test-add_source_parser/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-add_source_parser/source_parser.py b/tests/roots/test-add_source_parser/source_parser.py
index 69898ed91..69ad02db0 100644
--- a/tests/roots/test-add_source_parser/source_parser.py
+++ b/tests/roots/test-add_source_parser/source_parser.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
from docutils.parsers import Parser
diff --git a/tests/roots/test-api-set-translator/conf.py b/tests/roots/test-api-set-translator/conf.py
index 9a7312d65..5026b6186 100644
--- a/tests/roots/test-api-set-translator/conf.py
+++ b/tests/roots/test-api-set-translator/conf.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# set this by test
# import os
# import sys
diff --git a/tests/roots/test-api-set-translator/nonext/conf.py b/tests/roots/test-api-set-translator/nonext/conf.py
index 5a92f736f..fd7da9a55 100644
--- a/tests/roots/test-api-set-translator/nonext/conf.py
+++ b/tests/roots/test-api-set-translator/nonext/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-api-set-translator/translator.py b/tests/roots/test-api-set-translator/translator.py
index 9be1c7add..723ebc188 100644
--- a/tests/roots/test-api-set-translator/translator.py
+++ b/tests/roots/test-api-set-translator/translator.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
from sphinx.writers.html import HTMLTranslator
diff --git a/tests/roots/test-basic/conf.py b/tests/roots/test-basic/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-basic/conf.py
+++ b/tests/roots/test-basic/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-build-html-translator/conf.py b/tests/roots/test-build-html-translator/conf.py
index 2a9301380..97279209e 100644
--- a/tests/roots/test-build-html-translator/conf.py
+++ b/tests/roots/test-build-html-translator/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
from sphinx.writers.html import HTMLTranslator
project = 'test'
diff --git a/tests/roots/test-build-htmlhelp/conf.py b/tests/roots/test-build-htmlhelp/conf.py
index 95293e956..fcde6a5fc 100644
--- a/tests/roots/test-build-htmlhelp/conf.py
+++ b/tests/roots/test-build-htmlhelp/conf.py
@@ -1,4 +1,2 @@
-# -*- coding: utf-8 -*-
-
project = 'test'
master_doc = 'index'
diff --git a/tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py b/tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py
+++ b/tests/roots/test-builder-gettext-dont-rebuild-mo/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-default_role/conf.py b/tests/roots/test-default_role/conf.py
index f81c30bc4..2a35d6957 100644
--- a/tests/roots/test-default_role/conf.py
+++ b/tests/roots/test-default_role/conf.py
@@ -1,3 +1 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
diff --git a/tests/roots/test-directive-code/conf.py b/tests/roots/test-directive-code/conf.py
index aac0bc36a..4ac99fc27 100644
--- a/tests/roots/test-directive-code/conf.py
+++ b/tests/roots/test-directive-code/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
exclude_patterns = ['_build']
numfig = True
diff --git a/tests/roots/test-directive-code/literal-diff.inc b/tests/roots/test-directive-code/literal-diff.inc
index dc2ec3116..f9c21e32b 100644
--- a/tests/roots/test-directive-code/literal-diff.inc
+++ b/tests/roots/test-directive-code/literal-diff.inc
@@ -1,5 +1,4 @@
# Literally included file using Python highlighting
-# -*- coding: utf-8 -*-
foo = "Including Unicode characters: üöä"
diff --git a/tests/roots/test-directive-code/literal.inc b/tests/roots/test-directive-code/literal.inc
index a590f557b..fa8f0ca03 100644
--- a/tests/roots/test-directive-code/literal.inc
+++ b/tests/roots/test-directive-code/literal.inc
@@ -1,5 +1,4 @@
# Literally included file using Python highlighting
-# -*- coding: utf-8 -*-
foo = "Including Unicode characters: üöä"
diff --git a/tests/roots/test-directive-code/py-decorators.inc b/tests/roots/test-directive-code/py-decorators.inc
index b1864ab8d..012d5d572 100644
--- a/tests/roots/test-directive-code/py-decorators.inc
+++ b/tests/roots/test-directive-code/py-decorators.inc
@@ -1,5 +1,4 @@
# Literally included file using Python highlighting
-# -*- coding: utf-8 -*-
@class_decorator
@other_decorator()
diff --git a/tests/roots/test-directive-code/target.py b/tests/roots/test-directive-code/target.py
index a5c678648..b95dffbf9 100644
--- a/tests/roots/test-directive-code/target.py
+++ b/tests/roots/test-directive-code/target.py
@@ -1,5 +1,4 @@
# Literally included file using Python highlighting
-# -*- coding: utf-8 -*-
foo = "Including Unicode characters: üöä"
diff --git a/tests/roots/test-directives-raw/conf.py b/tests/roots/test-directives-raw/conf.py
index f81c30bc4..2a35d6957 100644
--- a/tests/roots/test-directives-raw/conf.py
+++ b/tests/roots/test-directives-raw/conf.py
@@ -1,3 +1 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
diff --git a/tests/roots/test-docutilsconf/conf.py b/tests/roots/test-docutilsconf/conf.py
index 0a88a65fd..d7f27e6e1 100644
--- a/tests/roots/test-docutilsconf/conf.py
+++ b/tests/roots/test-docutilsconf/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
project = 'Sphinx docutils conf <Tests>'
source_suffix = '.txt'
keep_warnings = True
diff --git a/tests/roots/test-domain-cpp/conf.py b/tests/roots/test-domain-cpp/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-domain-cpp/conf.py
+++ b/tests/roots/test-domain-cpp/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-domain-js/conf.py b/tests/roots/test-domain-js/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-domain-js/conf.py
+++ b/tests/roots/test-domain-js/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-domain-py/conf.py b/tests/roots/test-domain-py/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-domain-py/conf.py
+++ b/tests/roots/test-domain-py/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-double-inheriting-theme/conf.py b/tests/roots/test-double-inheriting-theme/conf.py
index 0ca019838..edb8928cd 100644
--- a/tests/roots/test-double-inheriting-theme/conf.py
+++ b/tests/roots/test-double-inheriting-theme/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
templates_path = ['_templates']
master_doc = 'index'
html_theme = 'base_theme2'
diff --git a/tests/roots/test-epub-anchor-id/conf.py b/tests/roots/test-epub-anchor-id/conf.py
index 3b73e0811..dcee678b8 100644
--- a/tests/roots/test-epub-anchor-id/conf.py
+++ b/tests/roots/test-epub-anchor-id/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-ext-autodoc/target/__init__.py b/tests/roots/test-ext-autodoc/target/__init__.py
index f30045292..c60bab20b 100644
--- a/tests/roots/test-ext-autodoc/target/__init__.py
+++ b/tests/roots/test-ext-autodoc/target/__init__.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import enum
from io import StringIO
diff --git a/tests/roots/test-ext-autosectionlabel-prefix-document/conf.py b/tests/roots/test-ext-autosectionlabel-prefix-document/conf.py
index 0a6491dd3..d28749500 100644
--- a/tests/roots/test-ext-autosectionlabel-prefix-document/conf.py
+++ b/tests/roots/test-ext-autosectionlabel-prefix-document/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.autosectionlabel']
master_doc = 'index'
autosectionlabel_prefix_document = True
diff --git a/tests/roots/test-ext-autosectionlabel/conf.py b/tests/roots/test-ext-autosectionlabel/conf.py
index 4a06c1835..7e8cc3408 100644
--- a/tests/roots/test-ext-autosectionlabel/conf.py
+++ b/tests/roots/test-ext-autosectionlabel/conf.py
@@ -1,4 +1,2 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.autosectionlabel']
master_doc = 'index'
diff --git a/tests/roots/test-ext-githubpages/conf.py b/tests/roots/test-ext-githubpages/conf.py
index a05848fa6..8fc08db64 100644
--- a/tests/roots/test-ext-githubpages/conf.py
+++ b/tests/roots/test-ext-githubpages/conf.py
@@ -1,4 +1,2 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.githubpages']
master_doc = 'index'
diff --git a/tests/roots/test-ext-graphviz/conf.py b/tests/roots/test-ext-graphviz/conf.py
index 2696280ee..a90de01a0 100644
--- a/tests/roots/test-ext-graphviz/conf.py
+++ b/tests/roots/test-ext-graphviz/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.graphviz']
master_doc = 'index'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-ext-ifconfig/conf.py b/tests/roots/test-ext-ifconfig/conf.py
index dc3c93b22..6b9dc7ce3 100644
--- a/tests/roots/test-ext-ifconfig/conf.py
+++ b/tests/roots/test-ext-ifconfig/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.ifconfig']
master_doc = 'index'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-ext-imgconverter/conf.py b/tests/roots/test-ext-imgconverter/conf.py
index 67cee152d..d01569a7d 100644
--- a/tests/roots/test-ext-imgconverter/conf.py
+++ b/tests/roots/test-ext-imgconverter/conf.py
@@ -1,4 +1,2 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
extensions = ['sphinx.ext.imgconverter']
diff --git a/tests/roots/test-ext-inheritance_diagram/conf.py b/tests/roots/test-ext-inheritance_diagram/conf.py
index 18680c1d9..ad1693966 100644
--- a/tests/roots/test-ext-inheritance_diagram/conf.py
+++ b/tests/roots/test-ext-inheritance_diagram/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-ext-inheritance_diagram/test.py b/tests/roots/test-ext-inheritance_diagram/test.py
index 32f7f273c..7d5cabeef 100644
--- a/tests/roots/test-ext-inheritance_diagram/test.py
+++ b/tests/roots/test-ext-inheritance_diagram/test.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-
-
class Foo(object):
pass
diff --git a/tests/roots/test-ext-intersphinx-cppdomain/conf.py b/tests/roots/test-ext-intersphinx-cppdomain/conf.py
index cbc4a8f43..0328a6350 100644
--- a/tests/roots/test-ext-intersphinx-cppdomain/conf.py
+++ b/tests/roots/test-ext-intersphinx-cppdomain/conf.py
@@ -1,4 +1,2 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.intersphinx']
master_doc = 'index'
diff --git a/tests/roots/test-ext-math-compat/conf.py b/tests/roots/test-ext-math-compat/conf.py
index c4f6005ea..aaa73ec75 100644
--- a/tests/roots/test-ext-math-compat/conf.py
+++ b/tests/roots/test-ext-math-compat/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
from docutils.parsers.rst import Directive
from sphinx.ext.mathbase import math, displaymath
diff --git a/tests/roots/test-ext-math-simple/conf.py b/tests/roots/test-ext-math-simple/conf.py
index 3fe886c17..f3def53cb 100644
--- a/tests/roots/test-ext-math-simple/conf.py
+++ b/tests/roots/test-ext-math-simple/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-ext-math/conf.py b/tests/roots/test-ext-math/conf.py
index 3fe886c17..f3def53cb 100644
--- a/tests/roots/test-ext-math/conf.py
+++ b/tests/roots/test-ext-math/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-ext-todo/conf.py b/tests/roots/test-ext-todo/conf.py
index 5d5619245..119357108 100644
--- a/tests/roots/test-ext-todo/conf.py
+++ b/tests/roots/test-ext-todo/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.todo']
master_doc = 'index'
diff --git a/tests/roots/test-ext-viewcode-find/conf.py b/tests/roots/test-ext-viewcode-find/conf.py
index 98f9e5fbb..83bde5cf9 100644
--- a/tests/roots/test-ext-viewcode-find/conf.py
+++ b/tests/roots/test-ext-viewcode-find/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
extensions = ['sphinx.ext.viewcode']
master_doc = 'index'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-ext-viewcode/conf.py b/tests/roots/test-ext-viewcode/conf.py
index 53ce4f7ce..940d24ba8 100644
--- a/tests/roots/test-ext-viewcode/conf.py
+++ b/tests/roots/test-ext-viewcode/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-footnotes/conf.py b/tests/roots/test-footnotes/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-footnotes/conf.py
+++ b/tests/roots/test-footnotes/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-gettext-template/conf.py b/tests/roots/test-gettext-template/conf.py
index 1f4d84d07..3f793b7cf 100644
--- a/tests/roots/test-gettext-template/conf.py
+++ b/tests/roots/test-gettext-template/conf.py
@@ -1,3 +1 @@
-# -*- coding: utf-8 -*-
-
templates_path = ['_templates']
diff --git a/tests/roots/test-glossary/conf.py b/tests/roots/test-glossary/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-glossary/conf.py
+++ b/tests/roots/test-glossary/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-html_assets/conf.py b/tests/roots/test-html_assets/conf.py
index 1a82bc9cc..b652d2b9a 100644
--- a/tests/roots/test-html_assets/conf.py
+++ b/tests/roots/test-html_assets/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
project = 'Sphinx'
version = '1.4.4'
diff --git a/tests/roots/test-html_entity/conf.py b/tests/roots/test-html_entity/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-html_entity/conf.py
+++ b/tests/roots/test-html_entity/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-image-in-parsed-literal/conf.py b/tests/roots/test-image-in-parsed-literal/conf.py
index 6c2d881a0..7d5209029 100644
--- a/tests/roots/test-image-in-parsed-literal/conf.py
+++ b/tests/roots/test-image-in-parsed-literal/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-image-in-section/conf.py b/tests/roots/test-image-in-section/conf.py
index 77f31b515..b5ad2b48e 100644
--- a/tests/roots/test-image-in-section/conf.py
+++ b/tests/roots/test-image-in-section/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-images/conf.py b/tests/roots/test-images/conf.py
index f81c30bc4..2a35d6957 100644
--- a/tests/roots/test-images/conf.py
+++ b/tests/roots/test-images/conf.py
@@ -1,3 +1 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
diff --git a/tests/roots/test-intl/conf.py b/tests/roots/test-intl/conf.py
index 0306ff38e..96ac664f2 100644
--- a/tests/roots/test-intl/conf.py
+++ b/tests/roots/test-intl/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
project = 'Sphinx intl <Tests>'
source_suffix = '.txt'
keep_warnings = True
diff --git a/tests/roots/test-keep_warnings/conf.py b/tests/roots/test-keep_warnings/conf.py
index d0db3db83..2a293848b 100644
--- a/tests/roots/test-keep_warnings/conf.py
+++ b/tests/roots/test-keep_warnings/conf.py
@@ -1,4 +1,2 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
keep_warnings = True
diff --git a/tests/roots/test-latex-babel/conf.py b/tests/roots/test-latex-babel/conf.py
index d35acc89f..dbc8b3f70 100644
--- a/tests/roots/test-latex-babel/conf.py
+++ b/tests/roots/test-latex-babel/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
numfig_format = {
'figure': 'Fig. %s',
diff --git a/tests/roots/test-latex-equations/conf.py b/tests/roots/test-latex-equations/conf.py
index 101e491e0..0957543e6 100644
--- a/tests/roots/test-latex-equations/conf.py
+++ b/tests/roots/test-latex-equations/conf.py
@@ -1,4 +1,2 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'equations'
extensions = ['sphinx.ext.imgmath']
diff --git a/tests/roots/test-latex-index/conf.py b/tests/roots/test-latex-index/conf.py
index f81c30bc4..2a35d6957 100644
--- a/tests/roots/test-latex-index/conf.py
+++ b/tests/roots/test-latex-index/conf.py
@@ -1,3 +1 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
diff --git a/tests/roots/test-latex-labels/conf.py b/tests/roots/test-latex-labels/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-latex-labels/conf.py
+++ b/tests/roots/test-latex-labels/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-latex-numfig/conf.py b/tests/roots/test-latex-numfig/conf.py
index 506186b26..2d60d05da 100644
--- a/tests/roots/test-latex-numfig/conf.py
+++ b/tests/roots/test-latex-numfig/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
extensions = ['sphinx.ext.imgmath'] # for math_numfig
diff --git a/tests/roots/test-latex-table/conf.py b/tests/roots/test-latex-table/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-latex-table/conf.py
+++ b/tests/roots/test-latex-table/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-latex-title/conf.py b/tests/roots/test-latex-title/conf.py
index 709f1be48..f77dd1597 100644
--- a/tests/roots/test-latex-title/conf.py
+++ b/tests/roots/test-latex-title/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
# set empty string to the third column to use the first section title to document title
diff --git a/tests/roots/test-manpage_url/conf.py b/tests/roots/test-manpage_url/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-manpage_url/conf.py
+++ b/tests/roots/test-manpage_url/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-markup-citation/conf.py b/tests/roots/test-markup-citation/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-markup-citation/conf.py
+++ b/tests/roots/test-markup-citation/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-markup-rubric/conf.py b/tests/roots/test-markup-rubric/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-markup-rubric/conf.py
+++ b/tests/roots/test-markup-rubric/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-maxlistdepth/conf.py b/tests/roots/test-maxlistdepth/conf.py
index 41d8a201e..3a6573847 100644
--- a/tests/roots/test-maxlistdepth/conf.py
+++ b/tests/roots/test-maxlistdepth/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-metadata/conf.py b/tests/roots/test-metadata/conf.py
index f81c30bc4..2a35d6957 100644
--- a/tests/roots/test-metadata/conf.py
+++ b/tests/roots/test-metadata/conf.py
@@ -1,3 +1 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
diff --git a/tests/roots/test-need-escaped/conf.py b/tests/roots/test-need-escaped/conf.py
index d65a22e07..38b21c694 100644
--- a/tests/roots/test-need-escaped/conf.py
+++ b/tests/roots/test-need-escaped/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
project = 'need <b>"escaped"</b> project'
smartquotes = False
diff --git a/tests/roots/test-nested-enumerated-list/conf.py b/tests/roots/test-nested-enumerated-list/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-nested-enumerated-list/conf.py
+++ b/tests/roots/test-nested-enumerated-list/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-numfig/conf.py b/tests/roots/test-numfig/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-numfig/conf.py
+++ b/tests/roots/test-numfig/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-prolog/conf.py b/tests/roots/test-prolog/conf.py
index a52ca878a..f6e19c044 100644
--- a/tests/roots/test-prolog/conf.py
+++ b/tests/roots/test-prolog/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
diff --git a/tests/roots/test-prolog/prolog_markdown_parser.py b/tests/roots/test-prolog/prolog_markdown_parser.py
index 56ce3cf5a..f8d787ce5 100644
--- a/tests/roots/test-prolog/prolog_markdown_parser.py
+++ b/tests/roots/test-prolog/prolog_markdown_parser.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
from docutils.parsers import Parser
diff --git a/tests/roots/test-pycode-egg/conf.py b/tests/roots/test-pycode-egg/conf.py
index a8e25882b..8840900a2 100644
--- a/tests/roots/test-pycode-egg/conf.py
+++ b/tests/roots/test-pycode-egg/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-pycode-egg/src/sample.py b/tests/roots/test-pycode-egg/src/sample.py
index c4d3d61e8..2ecf577f6 100644
--- a/tests/roots/test-pycode-egg/src/sample.py
+++ b/tests/roots/test-pycode-egg/src/sample.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
#: constant on sample.py
CONSTANT = 1
diff --git a/tests/roots/test-pycode-egg/src/setup.py b/tests/roots/test-pycode-egg/src/setup.py
index f23c80a06..6ad4986e4 100644
--- a/tests/roots/test-pycode-egg/src/setup.py
+++ b/tests/roots/test-pycode-egg/src/setup.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from setuptools import setup
diff --git a/tests/roots/test-refonly_bullet_list/conf.py b/tests/roots/test-refonly_bullet_list/conf.py
index 68357c9a4..5c878531a 100644
--- a/tests/roots/test-refonly_bullet_list/conf.py
+++ b/tests/roots/test-refonly_bullet_list/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_compact_lists = False
diff --git a/tests/roots/test-roles-download/conf.py b/tests/roots/test-roles-download/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-roles-download/conf.py
+++ b/tests/roots/test-roles-download/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-root/autodoc_target.py b/tests/roots/test-root/autodoc_target.py
index 9f02a6b21..a1540d90a 100644
--- a/tests/roots/test-root/autodoc_target.py
+++ b/tests/roots/test-root/autodoc_target.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import enum
from io import StringIO
diff --git a/tests/roots/test-root/conf.py b/tests/roots/test-root/conf.py
index 43fe39df1..1213a1448 100644
--- a/tests/roots/test-root/conf.py
+++ b/tests/roots/test-root/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
diff --git a/tests/roots/test-root/literal_orig.inc b/tests/roots/test-root/literal_orig.inc
index 14fd214c4..cfb5dd1e8 100644
--- a/tests/roots/test-root/literal_orig.inc
+++ b/tests/roots/test-root/literal_orig.inc
@@ -1,5 +1,4 @@
# Literally included file using Python highlighting
-# -*- coding: utf-8 -*-
foo = "Including Unicode characters: üöä" # This will be changed
diff --git a/tests/roots/test-setup/doc/conf.py b/tests/roots/test-setup/doc/conf.py
index b1c9acf46..f4dc6d624 100644
--- a/tests/roots/test-setup/doc/conf.py
+++ b/tests/roots/test-setup/doc/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
project = 'Sphinx smallest project'
source_suffix = '.txt'
keep_warnings = True
diff --git a/tests/roots/test-smartquotes/conf.py b/tests/roots/test-smartquotes/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-smartquotes/conf.py
+++ b/tests/roots/test-smartquotes/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-stylesheets/conf.py b/tests/roots/test-stylesheets/conf.py
index cae940080..f67c13cf5 100644
--- a/tests/roots/test-stylesheets/conf.py
+++ b/tests/roots/test-stylesheets/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
templates_path = ['_templates']
diff --git a/tests/roots/test-templating/conf.py b/tests/roots/test-templating/conf.py
index 4a21054ed..e03eaf18f 100644
--- a/tests/roots/test-templating/conf.py
+++ b/tests/roots/test-templating/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
project = 'Sphinx templating <Tests>'
source_suffix = '.txt'
keep_warnings = True
diff --git a/tests/roots/test-theming/conf.py b/tests/roots/test-theming/conf.py
index 15911eb3a..7b6726b15 100644
--- a/tests/roots/test-theming/conf.py
+++ b/tests/roots/test-theming/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
html_theme = 'test-theme'
html_theme_path = ['.', 'test_theme']
master_doc = 'index'
diff --git a/tests/roots/test-theming/setup.py b/tests/roots/test-theming/setup.py
index 77a5ada13..e62007f36 100644
--- a/tests/roots/test-theming/setup.py
+++ b/tests/roots/test-theming/setup.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-
-# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
diff --git a/tests/roots/test-theming/test_theme/__init__.py b/tests/roots/test-theming/test_theme/__init__.py
index 3474a8289..398408c5d 100644
--- a/tests/roots/test-theming/test_theme/__init__.py
+++ b/tests/roots/test-theming/test_theme/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
import os
diff --git a/tests/roots/test-tocdepth/conf.py b/tests/roots/test-tocdepth/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-tocdepth/conf.py
+++ b/tests/roots/test-tocdepth/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-toctree-empty/conf.py b/tests/roots/test-toctree-empty/conf.py
index dac85eb9a..ce27eb5fe 100644
--- a/tests/roots/test-toctree-empty/conf.py
+++ b/tests/roots/test-toctree-empty/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-toctree-glob/conf.py b/tests/roots/test-toctree-glob/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-toctree-glob/conf.py
+++ b/tests/roots/test-toctree-glob/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-toctree-maxdepth/conf.py b/tests/roots/test-toctree-maxdepth/conf.py
index c46e40773..d506716e5 100644
--- a/tests/roots/test-toctree-maxdepth/conf.py
+++ b/tests/roots/test-toctree-maxdepth/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
diff --git a/tests/roots/test-toctree/conf.py b/tests/roots/test-toctree/conf.py
index 31e7a6ed4..a98b9c425 100644
--- a/tests/roots/test-toctree/conf.py
+++ b/tests/roots/test-toctree/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
latex_documents = [
diff --git a/tests/roots/test-trim_doctest_flags/conf.py b/tests/roots/test-trim_doctest_flags/conf.py
index 693c7c371..41452bb81 100644
--- a/tests/roots/test-trim_doctest_flags/conf.py
+++ b/tests/roots/test-trim_doctest_flags/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
master_doc = 'index'
extensions = ['sphinx.ext.doctest']
diff --git a/tests/roots/test-warnings/conf.py b/tests/roots/test-warnings/conf.py
index 9fbcab199..4b57aebcb 100644
--- a/tests/roots/test-warnings/conf.py
+++ b/tests/roots/test-warnings/conf.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import os
import sys
sys.path.append(os.path.abspath('.'))
diff --git a/tests/test_config.py b/tests/test_config.py
index a94fa3160..919921468 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -126,9 +126,7 @@ def test_errors_warnings(logger, tempdir):
assert 'conf.py' in str(excinfo.value)
# test the automatic conversion of 2.x only code in configs
- (tempdir / 'conf.py').write_text(
- '# -*- coding: utf-8\n\nproject = u"Jägermeister"\n',
- encoding='utf-8')
+ (tempdir / 'conf.py').write_text('project = u"Jägermeister"\n', encoding='utf-8')
cfg = Config.read(tempdir, {}, None)
cfg.init_values()
assert cfg.project == 'Jägermeister'
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py
index c369df450..02ac5e8af 100644
--- a/tests/test_directive_code.py
+++ b/tests/test_directive_code.py
@@ -36,18 +36,18 @@ def test_LiteralIncludeReader(literal_inc_path):
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == literal_inc_path.text()
- assert lines == 14
+ assert lines == 13
assert reader.lineno_start == 1
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
def test_LiteralIncludeReader_lineno_start(literal_inc_path):
- options = {'lineno-start': 5}
+ options = {'lineno-start': 4}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == literal_inc_path.text()
- assert lines == 14
- assert reader.lineno_start == 5
+ assert lines == 13
+ assert reader.lineno_start == 4
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
@@ -57,7 +57,7 @@ def test_LiteralIncludeReader_pyobject1(literal_inc_path):
content, lines = reader.read()
assert content == ("class Foo:\n"
" pass\n")
- assert reader.lineno_start == 6
+ assert reader.lineno_start == 5
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
@@ -91,18 +91,17 @@ def test_LiteralIncludeReader_pyobject_and_lines(literal_inc_path):
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
def test_LiteralIncludeReader_lines1(literal_inc_path):
- options = {'lines': '1-4'}
+ options = {'lines': '1-3'}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == ("# Literally included file using Python highlighting\n"
- "# -*- coding: utf-8 -*-\n"
"\n"
"foo = \"Including Unicode characters: üöä\"\n")
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
def test_LiteralIncludeReader_lines2(literal_inc_path):
- options = {'lines': '1,4,6'}
+ options = {'lines': '1,3,5'}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == ("# Literally included file using Python highlighting\n"
@@ -112,18 +111,18 @@ def test_LiteralIncludeReader_lines2(literal_inc_path):
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
def test_LiteralIncludeReader_lines_and_lineno_match1(literal_inc_path):
- options = {'lines': '4-6', 'lineno-match': True}
+ options = {'lines': '3-5', 'lineno-match': True}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == ("foo = \"Including Unicode characters: üöä\"\n"
"\n"
"class Foo:\n")
- assert reader.lineno_start == 4
+ assert reader.lineno_start == 3
@pytest.mark.sphinx() # init locale for errors
def test_LiteralIncludeReader_lines_and_lineno_match2(literal_inc_path, app, status, warning):
- options = {'lines': '1,4,6', 'lineno-match': True}
+ options = {'lines': '0,3,5', 'lineno-match': True}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
with pytest.raises(ValueError):
content, lines = reader.read()
@@ -146,7 +145,7 @@ def test_LiteralIncludeReader_start_at(literal_inc_path):
" pass\n"
"\n"
"class Bar:\n")
- assert reader.lineno_start == 6
+ assert reader.lineno_start == 5
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
@@ -156,13 +155,13 @@ def test_LiteralIncludeReader_start_after(literal_inc_path):
content, lines = reader.read()
assert content == (" pass\n"
"\n")
- assert reader.lineno_start == 7
+ assert reader.lineno_start == 6
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
def test_LiteralIncludeReader_start_after_and_lines(literal_inc_path):
options = {'lineno-match': True, 'lines': '6-',
- 'start-after': 'coding', 'end-before': 'comment'}
+ 'start-after': 'Literally', 'end-before': 'comment'}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == ("\n"
@@ -170,7 +169,7 @@ def test_LiteralIncludeReader_start_after_and_lines(literal_inc_path):
" def baz():\n"
" pass\n"
"\n")
- assert reader.lineno_start == 8
+ assert reader.lineno_start == 7
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
@@ -219,7 +218,7 @@ def test_LiteralIncludeReader_prepend(literal_inc_path):
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
def test_LiteralIncludeReader_dedent(literal_inc_path):
# dedent: 2
- options = {'lines': '10-12', 'dedent': 2}
+ options = {'lines': '9-11', 'dedent': 2}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == (" def baz():\n"
@@ -227,7 +226,7 @@ def test_LiteralIncludeReader_dedent(literal_inc_path):
"\n")
# dedent: 4
- options = {'lines': '10-12', 'dedent': 4}
+ options = {'lines': '9-11', 'dedent': 4}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == ("def baz():\n"
@@ -235,7 +234,7 @@ def test_LiteralIncludeReader_dedent(literal_inc_path):
"\n")
# dedent: 6
- options = {'lines': '10-12', 'dedent': 6}
+ options = {'lines': '9-11', 'dedent': 6}
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
content, lines = reader.read()
assert content == ("f baz():\n"
@@ -278,7 +277,7 @@ def test_LiteralIncludeReader_diff(testroot, literal_inc_path):
content, lines = reader.read()
assert content == ("--- " + testroot + "/literal-diff.inc\n"
"+++ " + testroot + "/literal.inc\n"
- "@@ -7,8 +7,8 @@\n"
+ "@@ -6,8 +6,8 @@\n"
" pass\n"
" \n"
" class Bar:\n"
@@ -353,7 +352,7 @@ def test_code_block_namedlink_latex(app, status, warning):
def test_code_block_emphasize_latex(app, status, warning):
app.builder.build(['emphasize'])
latex = (app.outdir / 'Python.tex').text(encoding='utf-8').replace('\r\n', '\n')
- includes = '\\fvset{hllines={, 5, 6, 13, 14, 15, 24, 25, 26, 27,}}%\n'
+ includes = '\\fvset{hllines={, 5, 6, 13, 14, 15, 24, 25, 26,}}%\n'
assert includes in latex
includes = '\\end{sphinxVerbatim}\n\\sphinxresetverbatimhllines\n'
assert includes in latex
@@ -414,8 +413,7 @@ def test_literal_include_linenos(app, status, warning):
'10\n'
'11\n'
'12\n'
- '13\n'
- '14</pre></div></td>' in html)
+ '13</pre></div></td>' in html)
# :lineno-start:
assert ('<td class="linenos"><div class="linenodiv"><pre>'
@@ -431,8 +429,7 @@ def test_literal_include_linenos(app, status, warning):
'209\n'
'210\n'
'211\n'
- '212\n'
- '213</pre></div></td>' in html)
+ '212</pre></div></td>' in html)
# :lineno-match:
assert ('<td class="linenos"><div class="linenodiv"><pre>'