Package: python-fluids
Version: 1.0.9-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
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 <olivier.ga...@canonical.com>
+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

Reply via email to