Your message dated Mon, 12 Sep 2022 19:30:30 +0530
with message-id <[email protected]>
and subject line Re: python-fluids: Unpatched tests from .pc directory are 
executed as normal tests
has caused the Debian Bug report #1010803,
regarding python-fluids: Unpatched tests from .pc directory are executed as 
normal tests
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1010803: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010803
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-fluids
Version: 1.0.9-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear Maintainer,

  * Some tests (run by autopkgtest through pytest) require network.
  * The existing patch d/patches/fix-online-tests.patch is meant to
  modify the tests to get rid of the requirement to be online.
  * Unfortunately, after the patch is applied by quilt, pytest runs
  twice over each modified test, e.g.: 
    * tests/test_design_climate.py
    * .pc/fix-online-tests.patch/tests/test_design_climate.py
  * Tests under the .pc directory are unpatched, resulting in
  autopkgtest failure if network is not available.

In Ubuntu, the attached patch was applied to achieve the following:

  * Prevent autopkgtest failure (system under test does not have access to the
  Internet in Ubuntu) 
  * Although autopkgtest does not fail in Debian currently (does the
  system under test have access to the Internet?), autopkgtest logs [1] show
  that pytest executes tests from under the .pc directory. This could
  lead to unexpected side-effects:

  
.pc/fix-online-tests.patch/tests/test_design_climate.py::test_heating_degree_days
 PASSED [  0%]
  
.pc/fix-online-tests.patch/tests/test_design_climate.py::test_cooling_degree_days
 PASSED [  0%]
  
.pc/fix-online-tests.patch/tests/test_design_climate.py::test_month_average_temperature
 PASSED [  0%]
  
.pc/fix-online-tests.patch/tests/test_design_climate.py::test_IntegratedSurfaceDatabaseStation
 PASSED [  0%]
  .pc/fix-online-tests.patch/tests/test_design_climate.py::test_data PASSED [  
0%]
  .pc/fix-online-tests.patch/tests/test_design_climate.py::test_correct_WBAN 
PASSED [  0%]
  
.pc/fix-online-tests.patch/tests/test_design_climate.py::test_get_closest_station
 PASSED [  0%]
  
.pc/fix-online-tests.patch/tests/test_design_climate.py::test_get_station_year_text
 PASSED [  0%]
 
  * Exclude unpatched tests (in .pc/ directory) from being executed by pytest
    (LP: #1972805)

[1] 
https://ci.debian.net/data/autopkgtest/unstable/amd64/p/python-fluids/19996479/log.gz

Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-27-generic (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru python-fluids-1.0.9/debian/patches/pytest-exclude-quilt-dir.patch 
python-fluids-1.0.9/debian/patches/pytest-exclude-quilt-dir.patch
--- python-fluids-1.0.9/debian/patches/pytest-exclude-quilt-dir.patch   
1970-01-01 01:00:00.000000000 +0100
+++ python-fluids-1.0.9/debian/patches/pytest-exclude-quilt-dir.patch   
2022-05-10 10:32:08.000000000 +0200
@@ -0,0 +1,23 @@
+Description: Exclude .pc/ directory when executing pytest
+ We have debian patches (managed by quilt) that modify the tests that are run
+ with pytest. Unfortunately, pytest also runs over unpatched tests that quilt
+ stores in the .pc/ directory. This results in autopkgtest failures.
+ This patch instructs pytest to exclude the .pc/ directory.
+Author: Olivier Gayot <[email protected]>
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/python-fluids/+bug/1972805
+Last-Update: 2022-05-10
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: python-fluids-1.0.9ubuntu1/pytest.ini
+===================================================================
+--- python-fluids-1.0.9ubuntu1.orig/pytest.ini 2022-05-10 10:31:18.887277881 
+0200
++++ python-fluids-1.0.9ubuntu1/pytest.ini      2022-05-10 10:31:41.219339940 
+0200
+@@ -1,6 +1,6 @@
+ [pytest]
+ addopts = --doctest-glob='*.rst' --ignore='setup.py' 
--ignore='manual_runner.py' --ignore='make_test_stubs.py'
+-norecursedirs = .cache .git htmlcov notebooks dist
++norecursedirs = .cache .git .pc htmlcov notebooks dist
+ doctest_optionflags= NORMALIZE_WHITESPACE
+ 
+ markers =
diff -Nru python-fluids-1.0.9/debian/patches/series 
python-fluids-1.0.9/debian/patches/series
--- python-fluids-1.0.9/debian/patches/series   2022-01-25 19:52:10.000000000 
+0100
+++ python-fluids-1.0.9/debian/patches/series   2022-05-10 10:31:27.000000000 
+0200
@@ -2,3 +2,4 @@
 remove-shields-dot-io-images.patch
 use-debian-mathjax.patch
 fix-online-tests.patch
+pytest-exclude-quilt-dir.patch

--- End Message ---
--- Begin Message ---
Version: 1.0.22-1

Hi Olivier,

On Tue, 10 May 2022 12:50:40 +0200 Olivier Gayot <[email protected]> 
wrote:
> Package: python-fluids
> Version: 1.0.9-1
>   * Some tests (run by autopkgtest through pytest) require network.
>   * The existing patch d/patches/fix-online-tests.patch is meant to
>   modify the tests to get rid of the requirement to be online.
>   * Unfortunately, after the patch is applied by quilt, pytest runs
>   twice over each modified test, e.g.: 
>     * tests/test_design_climate.py
>     * .pc/fix-online-tests.patch/tests/test_design_climate.py
>   * Tests under the .pc directory are unpatched, resulting in
>   autopkgtest failure if network is not available.
> [...]

I am not the maintainer of this package, but I happened to fix a couple
of RC bugs in this package and uploaded to archive.
I noticed the same thing that you report, but I instead started running tests
out of the source tree (i.e. after copying tests to AUTOPKGTEST_TMP and testing 
there)
which I believe achieves the same goal. I find this even better because in this 
case
the installed package is actually being tested instead of the source tree 
itself.

But in any case, I think the concerns in this bug report are already addressed, 
and
I tried running tests in an environment where there is no internet, and they 
pass
there.
So, I am closing this bug report with the right version. Let me know if there's 
a remaining
problem and/or I missed something.

-- 
Best,
Nilesh

Attachment: signature.asc
Description: PGP signature


--- End Message ---
-- 
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to