-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid storing build time in gzip headers (#13)
Co-authored-by: James Addison <jay@jp-hosting.net> (cherry picked from commit 7278043)
- Loading branch information
1 parent
1ace65f
commit 13151e9
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
"""Test for devhelp extension.""" | ||
from time import sleep | ||
|
||
import pytest | ||
|
||
|
||
@pytest.mark.sphinx('devhelp', testroot='basic') | ||
def test_basic(app, status, warning): | ||
app.builder.build_all() | ||
|
||
|
||
@pytest.mark.sphinx('devhelp', testroot='basic', freshenv=True) | ||
def test_basic_deterministic_build(app): | ||
app.config.devhelp_basename, output_filename = 'testing', 'testing.devhelp.gz' | ||
|
||
app.builder.build_all() | ||
output_initial = (app.outdir / output_filename).read_bytes() | ||
|
||
sleep(2) | ||
|
||
app.builder.build_all() | ||
output_repeat = (app.outdir / output_filename).read_bytes() | ||
|
||
msg = f"Content of '{output_filename}' differed between builds." | ||
assert output_repeat == output_initial, msg |