From: "Michael R. Crusoe" <crusoe@debian.org>
Date: Fri, 29 May 2026 05:33:30 -0700
Subject: Allow for testing while building a Debian package

Forwarded: https://github.com/pypa/setuptools-scm/pull/1260

As we use SETUPTOOLS_SCM_PRETEND_VERSION and that interferes with the tests
---
 testing/conftest.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testing/conftest.py b/testing/conftest.py
index de1d990..b3d9626 100644
--- a/testing/conftest.py
+++ b/testing/conftest.py
@@ -26,6 +26,8 @@ def pytest_configure() -> None:
     # 2009-02-13T23:31:30+00:00
     os.environ["SOURCE_DATE_EPOCH"] = "1234567890"
     os.environ["SETUPTOOLS_SCM_DEBUG"] = "1"
+    if "SETUPTOOLS_SCM_PRETEND_VERSION" in os.environ:
+        del os.environ["SETUPTOOLS_SCM_PRETEND_VERSION"]
 
 
 VERSION_PKGS = ["setuptools", "setuptools_scm", "packaging", "build", "wheel"]
