Skip to content

Commit

Permalink
Tests: fixup: explicitly clear/delete SOURCE_DATE_EPOCH during `tes…
Browse files Browse the repository at this point in the history
…t_html_multi_line_copyright`
  • Loading branch information
jayaddison committed Jan 8, 2025
1 parent 74ec220 commit 336b006
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test_builders/test_build_html_copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
LOCALTIME_2009 = type(LT)(LT_NEW)


@pytest.fixture
def source_date_empty(monkeypatch):
with monkeypatch.context() as m:
m.delenv('SOURCE_DATE_EPOCH', raising=False)
yield


@pytest.fixture(
params=[
1199145600, # 2008-01-01 00:00:00
Expand All @@ -24,7 +31,7 @@ def source_date_year(request, monkeypatch):


@pytest.mark.sphinx('html', testroot='copyright-multiline')
def test_html_multi_line_copyright(app):
def test_html_multi_line_copyright(source_date_empty, app):
app.build(force_all=True)

content = (app.outdir / 'index.html').read_text(encoding='utf-8')
Expand Down

0 comments on commit 336b006

Please sign in to comment.