Hi Bdale!

On Mon, Aug 29, 2022 at 10:24:27AM -0600, Bdale Garbee wrote:
> I noticed that upstream is now at 1.1.29 where our package is 1.1.18, so
> I started by freshening the packaging repo to build 1.1.29.  Ironically,
> the build fails in the test suite with a probably easy to fix error that
> I just don't have time to work on today.
>
> I note that tox.ini in the upstream source seems to imply either pytest
> or nose can be used, but I'm not familiar enough with python test suites
> to immediately know if this is just left-over boilerplate, or if moving
> to pytest would be as simple as changing the tox.ini content?
>
> If someone else who understands python test suites better than I do has
> time to patch rocketcea to use a supported test suite and get 1.1.29 to
> build to completion, I'd love to have that help. 

Upstream uses pure unittest, so there is no need to use nose or pytest.
The attached patch updates Debian packaging to run unittest.

Unfortunately, it does not fix the test failure with 1.1.29 that I get:

  Chk: get_eps_at_PcOvPe ALL GOOD:1 --> At line 5462 of file rocketcea/py_cea.f 
(unit = 13, file = '/home/dmitry/RocketCEA/temp.dat')
  Fortran runtime error: End of file

I know neither Fortran nor format of that file (temp.dat) so I can't say
why it reaches end of file. I notice that version 1.1.18 used temp.csr
instead of temp.dat, but apparently those two files are identical.

The only thing I can suggest is to file an upstream bug about this failure.

But with my patch I can get version 1.1.18 build successfully without nose.

--
Dmitry Shachnev
From 84b13bac134d1e105ef74608179995bf07bd4901 Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mity...@debian.org>
Date: Sun, 4 Sep 2022 21:04:02 +0300
Subject: [PATCH] Use unittest instead of nose.

---
 debian/control | 2 +-
 debian/rules   | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index a5fdc1d..d22d0f2 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: science
 Priority: optional
 Maintainer: Bdale Garbee <bd...@gag.com>
 Build-Depends: debhelper-compat (= 12), dh-python, gfortran, python3-coverage, python3-all-dev, python3-future, 
-	python3-matplotlib, python3-nose, python3-numpy, python3-scipy, python3-setuptools
+	python3-matplotlib, python3-numpy, python3-scipy, python3-setuptools
 Standards-Version: 4.5.0
 Homepage: https://rocketcea.readthedocs.io
 Vcs-Git: https://salsa.debian.org/debian/rocketcea.git
diff --git a/debian/rules b/debian/rules
index e2f9bd8..c7a48df 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,9 @@ export PYBUILD_NAME=rocketcea
 %:
 	dh $@ --with python3 --buildsystem=pybuild
 
+override_dh_auto_test:
+	dh_auto_test -- --system custom --test-args 'cd {build_dir}; {interpreter} -m unittest discover -v'
+
 execute_after_dh_auto_test:
 	rm -f .pybuild/cpython3*rocketcea/build/separated_Noz.csv
 
-- 
2.35.1

Attachment: signature.asc
Description: PGP signature

Reply via email to