Skip to content

Commit

Permalink
fix tests and update to more recent versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Jul 1, 2024
1 parent a0f3005 commit dae129b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Install pre-commit hooks via
# pre-commit install

exclude: >
(?x)^(
test_html/
test_latex/
)$
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

# Define all extras
extras = {
"code_style": ["flake8<3.8.0,>=3.7.0", "black", "pre-commit==1.17.0"],
"code_style": ["flake8", "black", "pre-commit"],
"testing": [
"coverage",
"pytest>=3.6,<4",
"pytest~=7.1",
"pytest-cov",
"pytest-regressions",
"beautifulsoup4",
Expand All @@ -32,7 +32,7 @@
"defusedxml",
],
"rtd": [
"sphinx>=3.0",
"sphinx>=5.0",
"sphinx-book-theme",
"sphinxcontrib-bibtex",
"myst-parser",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_html/proof/_proof_with_labeled_math.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="proof admonition" id="proof">
<p>Proof. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut</p>
<div class="math notranslate nohighlight" id="equation-label1">
<span class="eqno">(1)<a class="headerlink" href="#equation-label1" title="Permalink to this equation"></a></span>\[P_t(x, y) = \mathbb 1\{x = y\} + t Q(x, y) + o(t)\]</div>
<span class="eqno">(1)<a class="headerlink" href="#equation-label1" title="Link to this equation"></a></span>\[P_t(x, y) = \mathbb 1\{x = y\} + t Q(x, y) + o(t)\]</div>
</div>
5 changes: 5 additions & 0 deletions tests/test_latex/test_latex_build.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
\begin{document}

\ifdefined\shorthandoff
\ifnum\catcode`\=\string=\active\shorthandoff{=}\fi
\ifnum\catcode`\"=\active\shorthandoff{"}\fi
\fi

\pagestyle{empty}
\sphinxmaketitle
\pagestyle{plain}
Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
# `tox -r`

[tox]
envlist = py{36,37,38}
envlist = py311-sphinx5
skip_missing_interpreters = true

[testenv]
recreate = false

[testenv:py{36,37,38}]
[testenv:py{39,310,311,312}-sphinx{5,6,7}]
extras = testing
deps =
sphinx2: sphinx>=2,<3
sphinx3: sphinx>=3,<4
sphinx5: sphinx>=5,<6
sphinx6: sphinx>=6,<7
sphinx7: sphinx>=7,<8
commands = pytest {posargs}

[testenv:docs-{update,clean}]
Expand Down

0 comments on commit dae129b

Please sign in to comment.