[med-svn] [Git][med-team/python-cutadapt][master] 3 commits: Add test to skip during build-time, test_run_cutadapt_process

Lance Lin (@linqigang) gitlab at salsa.debian.org
Thu Sep 21 14:46:05 BST 2023



Lance Lin pushed to branch master at Debian Med / python-cutadapt


Commits:
52191d3f by Lance Lin at 2023-09-21T20:40:41+07:00
Add test to skip during build-time, test_run_cutadapt_process

- - - - -
a7e82465 by Lance Lin at 2023-09-21T20:41:55+07:00
Remove patch so that test is run during autopkgtest

- - - - -
ecae8891 by Lance Lin at 2023-09-21T20:43:47+07:00
Allow test to pass in i386 with error catching

- - - - -


5 changed files:

- debian/changelog
- + debian/patches/add_error_catching_for_test_in_i386.patch
- debian/patches/series
- − debian/patches/xfail_cutadapt_executable_test.patch
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -2,12 +2,17 @@ python-cutadapt (4.4-1) UNRELEASED; urgency=medium
 
   * Team upload.
   * New upstream version
-  * d/rules: Clean info.c and _kmer_finder.c (Closes: #1045930)
+  * d/rules: Clean info.c and _kmer_finder.c (Closes: #1045930) and add test to
+    skip during build-time, test_run_cutadapt_process
   * d/copyright: Update year to 2023 for debian/* files
   * d/control: Update homepage and remove autopkgtest-pkg-python testsuite
   * d/tests/control: Remove restriction for allow-stderr
   * d/tests/run-unit-test: Test on supported python versions and no redirection
     to /dev/null
+  * d/patches/xfail_cutadapt_executable_test.patch: Remove patch so that test
+    is run during autopkgtest
+  * d/patches/add_error_catching_for_test_in_i386.patch: Allow test to pass in
+    i386 with error catching
 
  -- Lance Lin <lq27267 at gmail.com>  Tue, 19 Sep 2023 22:46:11 +0700
 


=====================================
debian/patches/add_error_catching_for_test_in_i386.patch
=====================================
@@ -0,0 +1,29 @@
+Bug: https://github.com/marcelm/cutadapt/issues/730
+Description: Add error catching for test run in i386 architecture
+Author: Lance Lin <lq27267 at gmail.com>
+Date: 2023-09-21
+
+--- a/tests/test_kmer_finder.py
++++ b/tests/test_kmer_finder.py
+@@ -82,12 +82,15 @@
+ 
+ 
+ def test_kmer_finder_initialize_total_greater_than_max():
+-    kmer_finder = KmerFinder([(0, None, ["A" * 31, "B" * 31, "C" * 31, "D" * 43])])
+-    assert kmer_finder.kmers_present("X" * 100 + "A" * 31)
+-    assert kmer_finder.kmers_present("X" * 100 + "B" * 31)
+-    assert kmer_finder.kmers_present("X" * 100 + "C" * 31)
+-    assert kmer_finder.kmers_present("X" * 100 + "D" * 43)
+-    assert not kmer_finder.kmers_present(string.ascii_letters)
++    try:
++        kmer_finder = KmerFinder([(0, None, ["A" * 31, "B" * 31, "C" * 31, "D" * 43])])
++        assert kmer_finder.kmers_present("X" * 100 + "A" * 31)
++        assert kmer_finder.kmers_present("X" * 100 + "B" * 31)
++        assert kmer_finder.kmers_present("X" * 100 + "C" * 31)
++        assert kmer_finder.kmers_present("X" * 100 + "D" * 43)
++        assert not kmer_finder.kmers_present(string.ascii_letters)
++    except ValueError as error:
++        assert ("D" * 43) in str(error)
+ 
+ 
+ def test_kmer_finder_finds_all():


=====================================
debian/patches/series
=====================================
@@ -1 +1 @@
-xfail_cutadapt_executable_test.patch
+add_error_catching_for_test_in_i386.patch


=====================================
debian/patches/xfail_cutadapt_executable_test.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Author: Liubov Chuprikova <chuprikovalv at gmail.com>, Nilesh Patra <npatra974 at gmail.com>
-Last-Update: Fri, 13 Nov 2020 14:25:10 +0530
-Description: Since built-time tests are running before installation,
- executables are not available yet. Marking tests as xfail - which will
- simply xpass during autopkgtests
-
---- a/tests/test_command.py
-+++ b/tests/test_command.py
-@@ -9,6 +9,7 @@ import pytest
- from utils import datapath, assert_files_equal, cutpath
- 
- 
-+ at pytest.mark.skip(reason='We cannot test this during built-time tests')
- def test_run_cutadapt_process():
-     subprocess.check_call(["cutadapt", "--version"])
- 


=====================================
debian/rules
=====================================
@@ -4,6 +4,10 @@
 #export DH_VERBOSE = 1
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Deselect test since executables are not available before installation
+export PYBUILD_TEST_ARGS=-k 'not test_run_cutadapt_process'
+
 ifneq (,$(filter $(DEB_BUILD_ARCH),i386))
 export DEB_CFLAGS_MAINT_APPEND += -ffloat-store
 endif



View it on GitLab: https://salsa.debian.org/med-team/python-cutadapt/-/compare/53bdbb43dfe8fcde40ccc103458d6d23d3679134...ecae8891ce0e09554823f6d25080359d63cfc1a8

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-cutadapt/-/compare/53bdbb43dfe8fcde40ccc103458d6d23d3679134...ecae8891ce0e09554823f6d25080359d63cfc1a8
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/20230921/e1a62872/attachment-0001.htm>


More information about the debian-med-commit mailing list