mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5876 from tk0miya/remove_magic_comments
Remove coding magic comments from tests
This commit is contained in:
commit
657fa843c8
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
from docutils.parsers.rst import Directive
|
from docutils.parsers.rst import Directive
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from docutils.parsers import Parser
|
from docutils.parsers import Parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from docutils.parsers import Parser
|
from docutils.parsers import Parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# set this by test
|
# set this by test
|
||||||
# import os
|
# import os
|
||||||
# import sys
|
# import sys
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from sphinx.writers.html import HTMLTranslator
|
from sphinx.writers.html import HTMLTranslator
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from sphinx.writers.html import HTMLTranslator
|
from sphinx.writers.html import HTMLTranslator
|
||||||
|
|
||||||
project = 'test'
|
project = 'test'
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
project = 'test'
|
project = 'test'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
numfig = True
|
numfig = True
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Literally included file using Python highlighting
|
# Literally included file using Python highlighting
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
foo = "Including Unicode characters: üöä"
|
foo = "Including Unicode characters: üöä"
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Literally included file using Python highlighting
|
# Literally included file using Python highlighting
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
foo = "Including Unicode characters: üöä"
|
foo = "Including Unicode characters: üöä"
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Literally included file using Python highlighting
|
# Literally included file using Python highlighting
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
@class_decorator
|
@class_decorator
|
||||||
@other_decorator()
|
@other_decorator()
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Literally included file using Python highlighting
|
# Literally included file using Python highlighting
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
foo = "Including Unicode characters: üöä"
|
foo = "Including Unicode characters: üöä"
|
||||||
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
project = 'Sphinx docutils conf <Tests>'
|
project = 'Sphinx docutils conf <Tests>'
|
||||||
source_suffix = '.txt'
|
source_suffix = '.txt'
|
||||||
keep_warnings = True
|
keep_warnings = True
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'base_theme2'
|
html_theme = 'base_theme2'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.autosectionlabel']
|
extensions = ['sphinx.ext.autosectionlabel']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
autosectionlabel_prefix_document = True
|
autosectionlabel_prefix_document = True
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.autosectionlabel']
|
extensions = ['sphinx.ext.autosectionlabel']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.githubpages']
|
extensions = ['sphinx.ext.githubpages']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.graphviz']
|
extensions = ['sphinx.ext.graphviz']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.ifconfig']
|
extensions = ['sphinx.ext.ifconfig']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
extensions = ['sphinx.ext.imgconverter']
|
extensions = ['sphinx.ext.imgconverter']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
class Foo(object):
|
class Foo(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.intersphinx']
|
extensions = ['sphinx.ext.intersphinx']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from docutils.parsers.rst import Directive
|
from docutils.parsers.rst import Directive
|
||||||
|
|
||||||
from sphinx.ext.mathbase import math, displaymath
|
from sphinx.ext.mathbase import math, displaymath
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.todo']
|
extensions = ['sphinx.ext.todo']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
extensions = ['sphinx.ext.viewcode']
|
extensions = ['sphinx.ext.viewcode']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
project = 'Sphinx'
|
project = 'Sphinx'
|
||||||
version = '1.4.4'
|
version = '1.4.4'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
project = 'Sphinx intl <Tests>'
|
project = 'Sphinx intl <Tests>'
|
||||||
source_suffix = '.txt'
|
source_suffix = '.txt'
|
||||||
keep_warnings = True
|
keep_warnings = True
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
keep_warnings = True
|
keep_warnings = True
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
numfig_format = {
|
numfig_format = {
|
||||||
'figure': 'Fig. %s',
|
'figure': 'Fig. %s',
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'equations'
|
master_doc = 'equations'
|
||||||
extensions = ['sphinx.ext.imgmath']
|
extensions = ['sphinx.ext.imgmath']
|
||||||
|
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
extensions = ['sphinx.ext.imgmath'] # for math_numfig
|
extensions = ['sphinx.ext.imgmath'] # for math_numfig
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# set empty string to the third column to use the first section title to document title
|
# set empty string to the third column to use the first section title to document title
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
project = 'need <b>"escaped"</b> project'
|
project = 'need <b>"escaped"</b> project'
|
||||||
smartquotes = False
|
smartquotes = False
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from docutils.parsers import Parser
|
from docutils.parsers import Parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
#: constant on sample.py
|
#: constant on sample.py
|
||||||
CONSTANT = 1
|
CONSTANT = 1
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_compact_lists = False
|
html_compact_lists = False
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Literally included file using Python highlighting
|
# Literally included file using Python highlighting
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
foo = "Including Unicode characters: üöä" # This will be changed
|
foo = "Including Unicode characters: üöä" # This will be changed
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
project = 'Sphinx smallest project'
|
project = 'Sphinx smallest project'
|
||||||
source_suffix = '.txt'
|
source_suffix = '.txt'
|
||||||
keep_warnings = True
|
keep_warnings = True
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
project = 'Sphinx templating <Tests>'
|
project = 'Sphinx templating <Tests>'
|
||||||
source_suffix = '.txt'
|
source_suffix = '.txt'
|
||||||
keep_warnings = True
|
keep_warnings = True
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
html_theme = 'test-theme'
|
html_theme = 'test-theme'
|
||||||
html_theme_path = ['.', 'test_theme']
|
html_theme_path = ['.', 'test_theme']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
extensions = ['sphinx.ext.doctest']
|
extensions = ['sphinx.ext.doctest']
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
sys.path.append(os.path.abspath('.'))
|
sys.path.append(os.path.abspath('.'))
|
||||||
|
@ -126,9 +126,7 @@ def test_errors_warnings(logger, tempdir):
|
|||||||
assert 'conf.py' in str(excinfo.value)
|
assert 'conf.py' in str(excinfo.value)
|
||||||
|
|
||||||
# test the automatic conversion of 2.x only code in configs
|
# test the automatic conversion of 2.x only code in configs
|
||||||
(tempdir / 'conf.py').write_text(
|
(tempdir / 'conf.py').write_text('project = u"Jägermeister"\n', encoding='utf-8')
|
||||||
'# -*- coding: utf-8\n\nproject = u"Jägermeister"\n',
|
|
||||||
encoding='utf-8')
|
|
||||||
cfg = Config.read(tempdir, {}, None)
|
cfg = Config.read(tempdir, {}, None)
|
||||||
cfg.init_values()
|
cfg.init_values()
|
||||||
assert cfg.project == 'Jägermeister'
|
assert cfg.project == 'Jägermeister'
|
||||||
|
@ -36,18 +36,18 @@ def test_LiteralIncludeReader(literal_inc_path):
|
|||||||
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == literal_inc_path.text()
|
assert content == literal_inc_path.text()
|
||||||
assert lines == 14
|
assert lines == 13
|
||||||
assert reader.lineno_start == 1
|
assert reader.lineno_start == 1
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||||
def test_LiteralIncludeReader_lineno_start(literal_inc_path):
|
def test_LiteralIncludeReader_lineno_start(literal_inc_path):
|
||||||
options = {'lineno-start': 5}
|
options = {'lineno-start': 4}
|
||||||
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == literal_inc_path.text()
|
assert content == literal_inc_path.text()
|
||||||
assert lines == 14
|
assert lines == 13
|
||||||
assert reader.lineno_start == 5
|
assert reader.lineno_start == 4
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
@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()
|
content, lines = reader.read()
|
||||||
assert content == ("class Foo:\n"
|
assert content == ("class Foo:\n"
|
||||||
" pass\n")
|
" pass\n")
|
||||||
assert reader.lineno_start == 6
|
assert reader.lineno_start == 5
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
@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")
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||||
def test_LiteralIncludeReader_lines1(literal_inc_path):
|
def test_LiteralIncludeReader_lines1(literal_inc_path):
|
||||||
options = {'lines': '1-4'}
|
options = {'lines': '1-3'}
|
||||||
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == ("# Literally included file using Python highlighting\n"
|
assert content == ("# Literally included file using Python highlighting\n"
|
||||||
"# -*- coding: utf-8 -*-\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"foo = \"Including Unicode characters: üöä\"\n")
|
"foo = \"Including Unicode characters: üöä\"\n")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||||
def test_LiteralIncludeReader_lines2(literal_inc_path):
|
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)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == ("# Literally included file using Python highlighting\n"
|
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")
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||||
def test_LiteralIncludeReader_lines_and_lineno_match1(literal_inc_path):
|
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)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == ("foo = \"Including Unicode characters: üöä\"\n"
|
assert content == ("foo = \"Including Unicode characters: üöä\"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"class Foo:\n")
|
"class Foo:\n")
|
||||||
assert reader.lineno_start == 4
|
assert reader.lineno_start == 3
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx() # init locale for errors
|
@pytest.mark.sphinx() # init locale for errors
|
||||||
def test_LiteralIncludeReader_lines_and_lineno_match2(literal_inc_path, app, status, warning):
|
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)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
@ -146,7 +145,7 @@ def test_LiteralIncludeReader_start_at(literal_inc_path):
|
|||||||
" pass\n"
|
" pass\n"
|
||||||
"\n"
|
"\n"
|
||||||
"class Bar:\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")
|
@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()
|
content, lines = reader.read()
|
||||||
assert content == (" pass\n"
|
assert content == (" pass\n"
|
||||||
"\n")
|
"\n")
|
||||||
assert reader.lineno_start == 7
|
assert reader.lineno_start == 6
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||||
def test_LiteralIncludeReader_start_after_and_lines(literal_inc_path):
|
def test_LiteralIncludeReader_start_after_and_lines(literal_inc_path):
|
||||||
options = {'lineno-match': True, 'lines': '6-',
|
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)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == ("\n"
|
assert content == ("\n"
|
||||||
@ -170,7 +169,7 @@ def test_LiteralIncludeReader_start_after_and_lines(literal_inc_path):
|
|||||||
" def baz():\n"
|
" def baz():\n"
|
||||||
" pass\n"
|
" pass\n"
|
||||||
"\n")
|
"\n")
|
||||||
assert reader.lineno_start == 8
|
assert reader.lineno_start == 7
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
@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")
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||||
def test_LiteralIncludeReader_dedent(literal_inc_path):
|
def test_LiteralIncludeReader_dedent(literal_inc_path):
|
||||||
# dedent: 2
|
# dedent: 2
|
||||||
options = {'lines': '10-12', 'dedent': 2}
|
options = {'lines': '9-11', 'dedent': 2}
|
||||||
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == (" def baz():\n"
|
assert content == (" def baz():\n"
|
||||||
@ -227,7 +226,7 @@ def test_LiteralIncludeReader_dedent(literal_inc_path):
|
|||||||
"\n")
|
"\n")
|
||||||
|
|
||||||
# dedent: 4
|
# dedent: 4
|
||||||
options = {'lines': '10-12', 'dedent': 4}
|
options = {'lines': '9-11', 'dedent': 4}
|
||||||
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == ("def baz():\n"
|
assert content == ("def baz():\n"
|
||||||
@ -235,7 +234,7 @@ def test_LiteralIncludeReader_dedent(literal_inc_path):
|
|||||||
"\n")
|
"\n")
|
||||||
|
|
||||||
# dedent: 6
|
# dedent: 6
|
||||||
options = {'lines': '10-12', 'dedent': 6}
|
options = {'lines': '9-11', 'dedent': 6}
|
||||||
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
|
||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == ("f baz():\n"
|
assert content == ("f baz():\n"
|
||||||
@ -278,7 +277,7 @@ def test_LiteralIncludeReader_diff(testroot, literal_inc_path):
|
|||||||
content, lines = reader.read()
|
content, lines = reader.read()
|
||||||
assert content == ("--- " + testroot + "/literal-diff.inc\n"
|
assert content == ("--- " + testroot + "/literal-diff.inc\n"
|
||||||
"+++ " + testroot + "/literal.inc\n"
|
"+++ " + testroot + "/literal.inc\n"
|
||||||
"@@ -7,8 +7,8 @@\n"
|
"@@ -6,8 +6,8 @@\n"
|
||||||
" pass\n"
|
" pass\n"
|
||||||
" \n"
|
" \n"
|
||||||
" class Bar:\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):
|
def test_code_block_emphasize_latex(app, status, warning):
|
||||||
app.builder.build(['emphasize'])
|
app.builder.build(['emphasize'])
|
||||||
latex = (app.outdir / 'Python.tex').text(encoding='utf-8').replace('\r\n', '\n')
|
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
|
assert includes in latex
|
||||||
includes = '\\end{sphinxVerbatim}\n\\sphinxresetverbatimhllines\n'
|
includes = '\\end{sphinxVerbatim}\n\\sphinxresetverbatimhllines\n'
|
||||||
assert includes in latex
|
assert includes in latex
|
||||||
@ -414,8 +413,7 @@ def test_literal_include_linenos(app, status, warning):
|
|||||||
'10\n'
|
'10\n'
|
||||||
'11\n'
|
'11\n'
|
||||||
'12\n'
|
'12\n'
|
||||||
'13\n'
|
'13</pre></div></td>' in html)
|
||||||
'14</pre></div></td>' in html)
|
|
||||||
|
|
||||||
# :lineno-start:
|
# :lineno-start:
|
||||||
assert ('<td class="linenos"><div class="linenodiv"><pre>'
|
assert ('<td class="linenos"><div class="linenodiv"><pre>'
|
||||||
@ -431,8 +429,7 @@ def test_literal_include_linenos(app, status, warning):
|
|||||||
'209\n'
|
'209\n'
|
||||||
'210\n'
|
'210\n'
|
||||||
'211\n'
|
'211\n'
|
||||||
'212\n'
|
'212</pre></div></td>' in html)
|
||||||
'213</pre></div></td>' in html)
|
|
||||||
|
|
||||||
# :lineno-match:
|
# :lineno-match:
|
||||||
assert ('<td class="linenos"><div class="linenodiv"><pre>'
|
assert ('<td class="linenos"><div class="linenodiv"><pre>'
|
||||||
|
Loading…
Reference in New Issue
Block a user