Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more test environments #88

Merged
merged 3 commits into from
Apr 11, 2020
Merged
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ python:
- 2.7
- 3.6
- 3.7
- 3.8
install:
pip install tox-travis
script:
Expand Down
32 changes: 23 additions & 9 deletions tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,17 +447,31 @@ def test_sphinx_resource_urls(app, status, warning):

content = open(path).read()

chunks = [
# Sphinx's resources URLs
'<script type="text/javascript" src="/en/latest/_static/jquery.js"></script>',
'<script type="text/javascript" src="/en/latest/_static/underscore.js"></script>',
'<script type="text/javascript" src="/en/latest/_static/doctools.js"></script>',
]
if sphinx.version_info < (2, 4, 0):
chunks = [
# Sphinx's resources URLs
'<script type="text/javascript" src="/en/latest/_static/jquery.js"></script>',
'<script type="text/javascript" src="/en/latest/_static/underscore.js"></script>',
'<script type="text/javascript" src="/en/latest/_static/doctools.js"></script>',
]
else:
# #6925: html: Remove redundant type="text/javascript" from <script> elements
chunks = [
# Sphinx's resources URLs
'<script src="/en/latest/_static/jquery.js"></script>',
'<script src="/en/latest/_static/underscore.js"></script>',
'<script src="/en/latest/_static/doctools.js"></script>',
]

if sphinx.version_info >= (1, 8):
chunks.append(
'<script type="text/javascript" src="/en/latest/_static/language_data.js"></script>',
)
if sphinx.version_info < (2, 4, 0):
chunks.append(
'<script type="text/javascript" src="/en/latest/_static/language_data.js"></script>',
)
else:
chunks.append(
'<script src="/en/latest/_static/language_data.js"></script>',
)

for chunk in chunks:
assert chunk in content
Expand Down
17 changes: 10 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
envlist =
docs
py27-sphinx{17,18}
py{36,37}-sphinx{17,18,20,21,22}
py{36,37,38}-sphinx{17,18,20,21,22,23,24,30}

[testenv]
deps =
pytest
pdbpp
.
sphinx17: sphinx==1.7.9
sphinx18: sphinx==1.8.5
sphinx20: sphinx==2.0.1
sphinx21: sphinx==2.1.2
sphinx22: sphinx==2.2.0
sphinx17: sphinx~=1.7.0
sphinx18: sphinx~=1.8.0
sphinx20: sphinx~=2.0.0
sphinx21: sphinx~=2.1.0
sphinx22: sphinx~=2.2.0
sphinx23: sphinx~=2.3.0
sphinx24: sphinx~=2.4.0
sphinx30: sphinx~=3.0.0
commands = pytest {posargs}

[testenv:py37-sphinx21]
[testenv:py38-sphinx30]
deps =
{[testenv]deps}
pytest-cov
Expand Down