Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ tests/test_docs/_build/
_build
htmlcov
.coverage
coverage.xml
build/
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@
builtin = "clear,rare"
ignore-words = ".github/codespell_ignore_words.txt"
skip = "./.git"


[tool.pytest.ini_options]
addopts = "-ra --strict-config --strict-markers --show-capture=all --showlocals -s -vv"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
junit_family = "xunit2"
log_cli_level = "INFO"
xfail_strict = true

[tool.coverage.run]
branch = true
omit = [
'*/_build/*',
]
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

1 change: 0 additions & 1 deletion tests/roots/test_module_class_names/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import os

# General information about the project.
Expand Down
1 change: 0 additions & 1 deletion tests/roots/test_package_prefix/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import sys

matlab_src_dir = os.path.abspath(".")
matlab_keep_package_prefix = True
Expand Down
16 changes: 0 additions & 16 deletions tests/test_autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
import pickle
import sys
import pytest
import helper
from sphinx.testing.fixtures import make_app, test_params # noqa: F811;
Expand All @@ -20,7 +19,6 @@ def rootdir():
return helper.rootdir(__file__)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this skipif because we never test with python less than 3.6

def test_target(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
app = make_app(srcdir=srcdir)
Expand All @@ -44,7 +42,6 @@ def test_target(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_target_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_show_property_default_value": True}
Expand All @@ -69,7 +66,6 @@ def test_target_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_target_auto_link_basic(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_auto_link": "basic"}
Expand All @@ -95,7 +91,6 @@ def test_target_auto_link_basic(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_target_auto_link_all(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_auto_link": "all"}
Expand Down Expand Up @@ -126,7 +121,6 @@ def test_target_auto_link_all(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_classfolder(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
app = make_app(srcdir=srcdir)
Expand All @@ -140,7 +134,6 @@ def test_classfolder(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_package(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
app = make_app(srcdir=srcdir)
Expand All @@ -163,7 +156,6 @@ def test_package(make_app, rootdir):
assert docstring3.rawsource == "Implement **doBar** stage, not called by ClassBar()"


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_package_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_show_property_default_value": True}
Expand All @@ -178,7 +170,6 @@ def test_package_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_package_auto_link_all(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_auto_link": "all"}
Expand Down Expand Up @@ -212,7 +203,6 @@ def test_package_auto_link_all(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_submodule(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
app = make_app(srcdir=srcdir)
Expand All @@ -228,7 +218,6 @@ def test_submodule(make_app, rootdir):
assert bases_line.rawsource == "Bases: :class:`target.package.ClassBar`"


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_submodule_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_show_property_default_value": True}
Expand All @@ -243,7 +232,6 @@ def test_submodule_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
app = make_app(srcdir=srcdir)
Expand All @@ -257,7 +245,6 @@ def test_root(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root_relative_matlab_src_dir(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_src_dir": "."}
Expand All @@ -272,7 +259,6 @@ def test_root_relative_matlab_src_dir(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_show_property_default_value": True}
Expand All @@ -287,7 +273,6 @@ def test_root_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root_auto_link_basic(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_auto_link": "basic"}
Expand All @@ -313,7 +298,6 @@ def test_root_auto_link_basic(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root_class_signature(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_class_signature": True}
Expand Down
2 changes: 0 additions & 2 deletions tests/test_autodoc_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
import pickle
import sys
import helper

import pytest
Expand All @@ -28,7 +27,6 @@ def rootdir():
testdata = [(False, False), (False, True), (True, False), (True, True)]


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
@pytest.mark.parametrize("show_default,show_specs", testdata)
def test_target(make_app, rootdir, show_default, show_specs):
srcdir = rootdir / "roots" / "test_autodoc"
Expand Down
14 changes: 0 additions & 14 deletions tests/test_autodoc_short_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
import pickle
import sys
import helper

import pytest
Expand All @@ -22,7 +21,6 @@ def rootdir():
return helper.rootdir(__file__)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_target(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True}
Expand All @@ -47,7 +45,6 @@ def test_target(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_target_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_show_property_default_value": True}
Expand All @@ -72,7 +69,6 @@ def test_target_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_target_auto_link_basic(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_auto_link": "basic"}
Expand All @@ -98,7 +94,6 @@ def test_target_auto_link_basic(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_target_auto_link_all(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_auto_link": "all"}
Expand Down Expand Up @@ -129,7 +124,6 @@ def test_target_auto_link_all(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_classfolder(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True}
Expand All @@ -144,7 +138,6 @@ def test_classfolder(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_package(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True}
Expand All @@ -168,7 +161,6 @@ def test_package(make_app, rootdir):
assert docstring3.rawsource == "Implement **doBar** stage, not called by ClassBar()"


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_package_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_show_property_default_value": True}
Expand All @@ -183,7 +175,6 @@ def test_package_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_package_auto_link_all(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_auto_link": "all"}
Expand Down Expand Up @@ -217,7 +208,6 @@ def test_package_auto_link_all(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_submodule(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True}
Expand All @@ -234,7 +224,6 @@ def test_submodule(make_app, rootdir):
assert bases_line.rawsource == "Bases: :class:`package.ClassBar`"


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_submodule_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_show_property_default_value": True}
Expand All @@ -249,7 +238,6 @@ def test_submodule_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True}
Expand All @@ -264,7 +252,6 @@ def test_root(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root_show_default_value(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_show_property_default_value": True}
Expand All @@ -279,7 +266,6 @@ def test_root_show_default_value(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_root_auto_link_basic(make_app, rootdir):
srcdir = rootdir / "roots" / "test_autodoc"
confdict = {"matlab_short_links": True, "matlab_auto_link": "basic"}
Expand Down
4 changes: 0 additions & 4 deletions tests/test_classfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
import pickle
import sys
import pytest
import helper
from sphinx.testing.fixtures import make_app, test_params # noqa: F811;
Expand All @@ -20,7 +19,6 @@ def rootdir():
return helper.rootdir(__file__)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_first(make_app, rootdir):
srcdir = rootdir / "roots" / "test_classfolder"
app = make_app(srcdir=srcdir)
Expand All @@ -33,7 +31,6 @@ def test_first(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_second(make_app, rootdir):
srcdir = rootdir / "roots" / "test_classfolder"
app = make_app(srcdir=srcdir)
Expand All @@ -46,7 +43,6 @@ def test_second(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_third(make_app, rootdir):
srcdir = rootdir / "roots" / "test_classfolder"
app = make_app(srcdir=srcdir)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_duplicated_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
import pickle
import sys
import docutils
import helper

Expand All @@ -23,7 +22,6 @@ def rootdir():
return helper.rootdir(__file__)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_with_prefix(make_app, rootdir):
srcdir = rootdir / "roots" / "test_duplicate_link"
app = make_app(srcdir=srcdir)
Expand All @@ -42,7 +40,6 @@ def test_with_prefix(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_without_prefix(make_app, rootdir):
srcdir = rootdir / "roots" / "test_duplicate_link"
confdict = {"matlab_keep_package_prefix": False}
Expand Down
3 changes: 0 additions & 3 deletions tests/test_module_class_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
import pickle
import sys
import pytest
import helper
from sphinx.testing.fixtures import make_app, test_params # noqa: F811;
Expand All @@ -20,7 +19,6 @@ def rootdir():
return helper.rootdir(__file__)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_index(make_app, rootdir):
srcdir = rootdir / "roots" / "test_module_class_names"
app = make_app(srcdir=srcdir)
Expand All @@ -34,7 +32,6 @@ def test_index(make_app, rootdir):
)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_index_auto_link_all(make_app, rootdir):
srcdir = rootdir / "roots" / "test_module_class_names"
confdict = {"matlab_auto_link": "all"}
Expand Down
2 changes: 0 additions & 2 deletions tests/test_no_matlab_src_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
import pickle
import sys
import helper

import pytest
Expand All @@ -22,7 +21,6 @@ def rootdir():
return helper.rootdir(__file__)


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")
def test_make(make_app, rootdir):
srcdir = rootdir / "roots" / "test_no_matlab_src_dir"
app = make_app(srcdir=srcdir)
Expand Down
Loading
Loading