From: Michael R. Crusoe <crusoe@debian.org>
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
--- setuptools-scm.orig/testing/conftest.py
+++ setuptools-scm/testing/conftest.py
@@ -26,6 +26,8 @@
     # 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"]
