8000 Ensure re-builds succeed · sphinx-contrib/jquery@307e5d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 307e5d3

Browse files
committed
Ensure re-builds succeed
1 parent 08d948a commit 307e5d3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sphinxcontrib/jquery/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def setup(app):
1313
jquery_installed = getattr(app, "_sphinxcontrib_jquery_installed", False)
1414
if sphinx.version_info[:2] >= (6, 0) and not jquery_installed:
15-
makedirs(path.join(app.outdir, '_static'))
15+
makedirs(path.join(app.outdir, '_static'), exist_ok=True)
1616
for filename in (
1717
'jquery.js',
1818
'_sphinx_javascript_frameworks_compat.js',

tests/test_jquery_installed.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
def run_blank_app(srcdir, **kwargs):
1010
Path(srcdir, "conf.py").write_text("", encoding="ascii")
1111
Path(srcdir, "index.rst").write_text("", encoding="ascii")
12-
app = SphinxTestApp(**kwargs, srcdir=srcdir)
13-
app.builder.build_all()
14-
app.cleanup()
12+
for _ in range(2): # build twice to test re-builds
13+
app = SphinxTestApp(**kwargs, srcdir=srcdir)
14+
app.builder.build_all()
15+
app.cleanup()
1516
return Path(srcdir, "_build", "html")
1617

1718

0 commit comments

Comments
 (0)
0