[med-svn] [Git][med-team/python-cogent][master] 3 commits: Drop fix-build-on-single-cpu-systems.patch

Santiago Vila (@sanvila) gitlab at salsa.debian.org
Sat Oct 28 22:19:26 BST 2023



Santiago Vila pushed to branch master at Debian Med / python-cogent


Commits:
7c01e841 by Santiago Vila at 2023-10-28T22:29:30+02:00
Drop fix-build-on-single-cpu-systems.patch

- - - - -
e67bc0a3 by Santiago Vila at 2023-10-28T22:30:30+02:00
Add skip-parallel-tests-on-single-cpu-systems.patch

- - - - -
8babc52f by Santiago Vila at 2023-10-28T22:41:05+02:00
Upload to unstable as 2023.2.12a1+dfsg-4

- - - - -


3 changed files:

- debian/changelog
- debian/patches/series
- debian/patches/fix-build-on-single-cpu-systems.patch → debian/patches/skip-parallel-tests-on-single-cpu-systems.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+python-cogent (2023.2.12a1+dfsg-4) unstable; urgency=medium
+
+  * Team upload.
+  * Drop old patch fix-build-on-single-cpu-systems.patch,
+    as it disables parallel tests for everybody.
+  * Add new patch skip-parallel-tests-on-single-cpu-systems.patch
+    instead, which does what its name suggests. Closes: #1030885.
+
+ -- Santiago Vila <sanvila at debian.org>  Sat Oct 28 22:30:00 2023 +0200
+
 python-cogent (2023.2.12a1+dfsg-3) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/series
=====================================
@@ -2,4 +2,4 @@ sphinx.patch
 fix_interpreter.patch
 remove-jupyter-sphinx.patch
 ignore_tests_accessing_network.patch
-fix-build-on-single-cpu-systems.patch
+skip-parallel-tests-on-single-cpu-systems.patch


=====================================
debian/patches/fix-build-on-single-cpu-systems.patch → debian/patches/skip-parallel-tests-on-single-cpu-systems.patch
=====================================
@@ -1,43 +1,57 @@
 Author: Santiago Vila <sanvila at debian.org>
-Last-Update: 2023-10-20
+Last-Update: 2023-10-28
 Bug-Debian: https://bugs.debian.org/1030885
-Description: Skip tests that are failing on single-cpu systems
+Description: Skip parallel tests on single-cpu systems
 
 --- a/tests/test_app/test_evo.py
 +++ b/tests/test_app/test_evo.py
-@@ -2,7 +2,7 @@
+@@ -1,8 +1,9 @@
+ import pathlib
++import multiprocessing
  
  from os.path import dirname, join
  from tempfile import TemporaryDirectory
 -from unittest import TestCase, main
-+from unittest import TestCase, main, skip
++from unittest import TestCase, main, skipIf
  from unittest.mock import MagicMock
  
  from numpy.testing import assert_allclose, assert_raises
-@@ -854,6 +854,7 @@
+@@ -854,6 +855,7 @@
          # correct message being relayed
          self.assertTrue("ValueError: '-' at" in result.message)
  
-+    @skip("Does not work on single-cpu systems")
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
      def test_bstrap_parallel(self):
          """exercising bootstrap with parallel"""
          aln = load_aligned_seqs(join(data_dir, "brca1.fasta"), moltype="dna")
---- a/tests/test_util/test_parallel.py
-+++ b/tests/test_util/test_parallel.py
-@@ -2,7 +2,7 @@
- import sys
- import time
+--- a/tests/test_app/test_io_new.py
++++ b/tests/test_app/test_io_new.py
+@@ -4,8 +4,10 @@
+ import os
+ import pathlib
+ import pickle
++import multiprocessing
  
--from unittest import TestCase, main, skipIf
-+from unittest import TestCase, main, skipIf, skip
+ from pathlib import Path
++from unittest import skipIf
  
  import numpy
+ import pytest
+@@ -479,6 +481,7 @@
+     assert isinstance(writer.data_store.summary_not_completed, Table)
+ 
  
++ at skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+ def test_write_db_parallel(tmp_dir, fasta_dir):
+     """writing with overwrite in parallel should reset db"""
+     dstore = open_data_store(fasta_dir, suffix="fasta")
+--- a/tests/test_util/test_parallel.py
++++ b/tests/test_util/test_parallel.py
 @@ -35,6 +35,7 @@
  
  
  class ParallelTests(TestCase):
-+    @skip("Does not work on single-cpu systems")
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
      def test_create_processes(self):
          """Procressor pool should create multiple distingue processes"""
          max_worker_count = multiprocessing.cpu_count() - 1
@@ -45,7 +59,7 @@ Description: Skip tests that are failing on single-cpu systems
          self.assertEqual(sorted(list(result_values)), index)
          self.assertEqual(len(set(result_processes)), max_worker_count)
  
-+    @skip("Does not work on single-cpu systems")
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
      def test_random_seeding(self):
          """Random seed should be set every function call"""
          # On Windows process ids are not guaranteed to be sequential(1,2,3,4...)
@@ -53,25 +67,7 @@ Description: Skip tests that are failing on single-cpu systems
          self.assertEqual(result1[0], result2[0])
          self.assertNotEqual(result1, result2)
  
-+    @skip("Does not work on single-cpu systems")
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
      @skipIf(sys.version_info[1] < 7, "method exclusive to Python 3.7 and above")
      def test_is_master_process(self):
          """
---- a/tests/test_app/test_io_new.py
-+++ b/tests/test_app/test_io_new.py
-@@ -6,6 +6,7 @@
- import pickle
- 
- from pathlib import Path
-+from unittest import skip
- 
- import numpy
- import pytest
-@@ -479,6 +480,7 @@
-     assert isinstance(writer.data_store.summary_not_completed, Table)
- 
- 
-+ at skip("Does not work on single-cpu systems")
- def test_write_db_parallel(tmp_dir, fasta_dir):
-     """writing with overwrite in parallel should reset db"""
-     dstore = open_data_store(fasta_dir, suffix="fasta")



View it on GitLab: https://salsa.debian.org/med-team/python-cogent/-/compare/7d6026b3efad0afea2117bb8a12e367103ca1141...8babc52f17791cdc7e48a177c0102ac2fc5362fe

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-cogent/-/compare/7d6026b3efad0afea2117bb8a12e367103ca1141...8babc52f17791cdc7e48a177c0102ac2fc5362fe
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231028/05474dcd/attachment-0001.htm>


More information about the debian-med-commit mailing list