mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 19:29:53 +03:00
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
Patch-Source: https://github.com/python-poetry/poetry-core/commit/2f33eb0fd75a1876c721a6128ee1b6ee9846d62c
|
|
|
|
From 2f33eb0fd75a1876c721a6128ee1b6ee9846d62c Mon Sep 17 00:00:00 2001
|
|
From: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
|
|
Date: Fri, 17 Jan 2025 13:35:53 +0100
|
|
Subject: [PATCH] fix(tests): clear SOURCE_DATE_EPOCH env var
|
|
|
|
Resolves: python-poetry/poetry#10011
|
|
---
|
|
tests/conftest.py | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/tests/conftest.py b/tests/conftest.py
|
|
index 7d10143f3..5ab1331cd 100644
|
|
--- a/tests/conftest.py
|
|
+++ b/tests/conftest.py
|
|
@@ -1,5 +1,6 @@
|
|
from __future__ import annotations
|
|
|
|
+import os
|
|
import sys
|
|
import tempfile
|
|
|
|
@@ -120,3 +121,10 @@ def with_mocked_get_vcs(mocker: MockerFixture) -> None:
|
|
"poetry.core.vcs.git.Git.run", return_value="This is a mocked Git.run() output."
|
|
)
|
|
mocker.patch("poetry.core.vcs.get_vcs", return_value=Git())
|
|
+
|
|
+
|
|
+@pytest.fixture(autouse=True)
|
|
+def clear_env_source_date_epoch() -> None:
|
|
+ """Clear SOURCE_DATE_EPOCH from environment to avoid non-deterministic failures"""
|
|
+ if "SOURCE_DATE_EPOCH" in os.environ:
|
|
+ del os.environ["SOURCE_DATE_EPOCH"]
|