A more simple approach would be to modify debian/rules so that
(all) the tests are skipped after a certain date,
as in the attached patch.

Thanks.
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,9 @@ export PYBUILD_TEST_ARGS=../../../ndcube
 export http_proxy=127.0.0.1:9
 export HOME=$(shell mktemp -d)
 
+CURRENT_TS := $(shell date +%s)
+EXPIRE_TS := $(shell date +%s -d "2023-12-01")
+
 BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
 SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)" -D html_show_copyright=0
 
@@ -36,3 +39,6 @@ override_dh_link:
        dh_link
        # Remove duplicates in documentation package
        jdupes -rl debian/python3-ndcube-doc/usr
+
+override_dh_auto_test:
+       [ "$(CURRENT_TS)" -gt "$(EXPIRE_TS)" ] || dh_auto_test

Reply via email to