[med-svn] [Git][med-team/python-cogent][master] 2 commits: Update skip-parallel-tests-on-single-cpu-systems.patch to skip...
Santiago Vila (@sanvila)
gitlab at salsa.debian.org
Fri Jul 5 17:52:26 BST 2024
Santiago Vila pushed to branch master at Debian Med / python-cogent
Commits:
8da22a9e by Santiago Vila at 2024-07-05T18:48:15+02:00
Update skip-parallel-tests-on-single-cpu-systems.patch to skip "test_write_db_parallel" again. Closes: #1030885.
- - - - -
61224724 by Santiago Vila at 2024-07-05T18:49:27+02:00
Upload to unstable as 2024.5.7a1+dfsg-3
- - - - -
2 changed files:
- debian/changelog
- debian/patches/skip-parallel-tests-on-single-cpu-systems.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+python-cogent (2024.5.7a1+dfsg-3) unstable; urgency=medium
+
+ * Team upload.
+ * Update skip-parallel-tests-on-single-cpu-systems.patch
+ to skip "test_write_db_parallel" again. Closes: #1030885.
+
+ -- Santiago Vila <sanvila at debian.org> Fri, 05 Jul 2024 18:45:00 +0200
+
python-cogent (2024.5.7a1+dfsg-2) unstable; urgency=medium
* Fix binary-any build
=====================================
debian/patches/skip-parallel-tests-on-single-cpu-systems.patch
=====================================
@@ -1,11 +1,55 @@
Author: Santiago Vila <sanvila at debian.org>
-Last-Update: 2023-10-28
+Last-Update: 2024-07-05
Bug-Debian: https://bugs.debian.org/1030885
Description: Skip parallel tests on single-cpu systems
+--- a/tests/test_app/test_evo.py
++++ b/tests/test_app/test_evo.py
+@@ -2,10 +2,11 @@
+
+ from os.path import dirname, join
+ from tempfile import TemporaryDirectory
+-from unittest import TestCase
++from unittest import TestCase, skipIf
+ from unittest.mock import MagicMock
+
+ import pytest
++import multiprocessing
+
+ from numpy.testing import assert_allclose, assert_raises
+
+@@ -846,6 +847,7 @@
+ _ = io.load_db() + evo_app.bootstrap(hyp, num_reps=2) + writer
+
+
++ at skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+ def test_bstrap_parallel():
+ """exercising bootstrap with parallel"""
+ aln = load_aligned_seqs(join(data_dir, "brca1.fasta"), moltype="dna")
+--- a/tests/test_app/test_io.py
++++ b/tests/test_app/test_io.py
+@@ -9,8 +9,10 @@
+
+ import numpy
+ import pytest
++import multiprocessing
+
+ from numpy.testing import assert_allclose
++from unittest import skipIf
+
+ from cogent3 import DNA, get_app, open_data_store
+ from cogent3.app import io as io_app
+@@ -481,6 +483,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
-@@ -25,6 +25,7 @@ def check_is_master_process(n):
+@@ -25,6 +25,7 @@
class ParallelTests(TestCase):
@@ -13,7 +57,7 @@ Description: Skip parallel tests on single-cpu systems
def test_create_processes(self):
"""Procressor pool should create multiple distingue processes"""
max_worker_count = multiprocessing.cpu_count() - 1
-@@ -35,6 +36,7 @@ class ParallelTests(TestCase):
+@@ -35,6 +36,7 @@
self.assertEqual(sorted(list(result_values)), index)
self.assertEqual(len(set(result_processes)), max_worker_count)
@@ -21,7 +65,7 @@ Description: Skip parallel tests 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...)
-@@ -46,6 +48,7 @@ class ParallelTests(TestCase):
+@@ -46,6 +48,7 @@
self.assertEqual(result1[0], result2[0])
self.assertNotEqual(result1, result2)
@@ -29,26 +73,3 @@ Description: Skip parallel tests 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_evo.py
-+++ b/tests/test_app/test_evo.py
-@@ -2,10 +2,11 @@ import pathlib
-
- from os.path import dirname, join
- from tempfile import TemporaryDirectory
--from unittest import TestCase
-+from unittest import TestCase, skipIf
- from unittest.mock import MagicMock
-
- import pytest
-+import multiprocessing
-
- from numpy.testing import assert_allclose, assert_raises
-
-@@ -846,6 +847,7 @@ class TestBootstrap(TestCase):
- _ = io.load_db() + evo_app.bootstrap(hyp, num_reps=2) + writer
-
-
-+ at skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
- def test_bstrap_parallel():
- """exercising bootstrap with parallel"""
- aln = load_aligned_seqs(join(data_dir, "brca1.fasta"), moltype="dna")
View it on GitLab: https://salsa.debian.org/med-team/python-cogent/-/compare/ec8bb7568e78a1daddc6fa2d8c0ace459fc2b598...61224724024ca36fd08a506a49bea294ed7ea126
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/med-team/python-cogent/-/compare/ec8bb7568e78a1daddc6fa2d8c0ace459fc2b598...61224724024ca36fd08a506a49bea294ed7ea126
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/20240705/643e8de3/attachment-0001.htm>
More information about the debian-med-commit
mailing list