[Debian-med-packaging] Bug#1082368: FTBFS: TestIntegration.testIntegration: AssertionError: 1 != 0

Stefano Rivera stefanor at debian.org
Fri Sep 20 12:22:34 BST 2024


Source: pychopper
Version: 2.7.10-1
Severity: serious
Tags: ftbfs
Justification: FTBFS

Dear maintainer,

During a test rebuild, pychopper failed to rebuild.

-------------------------------------------------------------------------------
[...]
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_test -- --system=custom --test-args="export PATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts:$PATH; \
chmod +x /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper; PYTHONPATH={build_dir} {interpreter} -m pytest -v"
	pybuild --test --test-pytest -i python{version} -p 3.12 --system=custom "--test-args=export PATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games; chmod +x /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper; PYTHONPATH={build_dir} {interpreter} -m pytest -v"
I: pybuild pybuild:308: cp -av /<<PKGBUILDDIR>>/pychopper/tests/ /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/
'/<<PKGBUILDDIR>>/pychopper/tests/' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests'
'/<<PKGBUILDDIR>>/pychopper/tests/__init__.py' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/__init__.py'
'/<<PKGBUILDDIR>>/pychopper/tests/data' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data'
'/<<PKGBUILDDIR>>/pychopper/tests/data/.gitignore' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data/.gitignore'
'/<<PKGBUILDDIR>>/pychopper/tests/data/PCS111_umi_test_reads.fastq.gz' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data/PCS111_umi_test_reads.fastq.gz'
'/<<PKGBUILDDIR>>/pychopper/tests/data/PCS111_umi_test_reads_expected.fastq' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data/PCS111_umi_test_reads_expected.fastq'
'/<<PKGBUILDDIR>>/pychopper/tests/data/barcodes.fas' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data/barcodes.fas'
'/<<PKGBUILDDIR>>/pychopper/tests/data/expected_output.fas' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data/expected_output.fas'
'/<<PKGBUILDDIR>>/pychopper/tests/data/ref.fas.gz' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data/ref.fas.gz'
'/<<PKGBUILDDIR>>/pychopper/tests/data/ref.fq.gz' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/data/ref.fq.gz'
'/<<PKGBUILDDIR>>/pychopper/tests/test_detector.py' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/test_detector.py'
'/<<PKGBUILDDIR>>/pychopper/tests/test_regression_simple.py' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/test_regression_simple.py'
'/<<PKGBUILDDIR>>/pychopper/tests/__pycache__' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/__pycache__'
'/<<PKGBUILDDIR>>/pychopper/tests/__pycache__/__init__.cpython-312.pyc' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/__pycache__/__init__.cpython-312.pyc'
'/<<PKGBUILDDIR>>/pychopper/tests/__pycache__/test_detector.cpython-312.pyc' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/__pycache__/test_detector.cpython-312.pyc'
'/<<PKGBUILDDIR>>/pychopper/tests/__pycache__/test_regression_simple.cpython-312.pyc' -> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/tests/__pycache__/test_regression_simple.cpython-312.pyc'
I: pybuild base:311: export PATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games; chmod +x /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper; PYTHONPATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build python3.12 -m pytest -v
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.12
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/<<PKGBUILDDIR>>/.hypothesis/examples'))
rootdir: /<<PKGBUILDDIR>>
configfile: pytest.ini
testpaths: pychopper
plugins: mock-3.14.0, openfiles-0.6.0, hypothesis-6.112.0, forked-1.6.0, remotedata-0.4.1, typeguard-4.3.0, xdist-3.6.1, arraydiff-0.6.1, doctestplus-1.2.1, timeout-2.3.1, xonsh-0.15.1, cov-5.0.0
collecting ... collected 4 items

pychopper/tests/test_detector.py::TestDetector::testPairAlign PASSED     [ 25%]
pychopper/tests/test_detector.py::TestDetector::testScoreCutoff PASSED   [ 50%]
pychopper/tests/test_regression_simple.py::TestIntegration::testIntegration FAILED [ 75%]
pychopper/tests/test_regression_simple.py::TestIntegration::testIntegration_umi FAILED [100%]

=================================== FAILURES ===================================
_______________________ TestIntegration.testIntegration ________________________

self = <pychopper.tests.test_regression_simple.TestIntegration testMethod=testIntegration>

    def testIntegration(self):
        """ Integration test. """
        base = path.dirname(__file__)
        test_base = path.join(base, 'data')
    
        barcodes = path.join(test_base, 'barcodes.fas')
        input_fasta = path.join(test_base, 'ref.fq.gz')
        output_fasta = path.join(test_base, 'test_output.fq.gz')
        expected_output = path.join(test_base, 'expected_output.fas')
    
        subprocess.call("{} {} {} {} {}".format('pychopper', "-Y 0 -B 3 -q 0.5 -m edlib -b", barcodes, input_fasta, output_fasta), shell=True)
        retval = subprocess.call(['cmp', output_fasta, expected_output])
>       self.assertEqual(retval, 0)
E       AssertionError: 1 != 0

pychopper/tests/test_regression_simple.py:21: AssertionError
----------------------------- Captured stderr call -----------------------------
Using kit: /<<PKGBUILDDIR>>/pychopper/tests/data/barcodes.fas
Configurations to consider: "+:SSP,-VNP|-:VNP,-SSP"
Processing the whole dataset using a batch size of 3:

  0%|          | 0/1665 [00:00<?, ?it/s]concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.12/concurrent/futures/process.py", line 263, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/process.py", line 212, in _process_chunk
    return [fn(*args) for args in chunk]
            ^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/edlib_backend.py", line 94, in _find_locations_single
    refined_locations = refine_locations(read, all_primers, all_locations)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/parasail_backend.py", line 54, in refine_locations
    aln = pair_align(seq[loc.RefStart:loc.RefEnd], all_primers[loc.Query], loc.Query, subs_mat, aln_params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/parasail_backend.py", line 45, in pair_align
    return process_alignment(aln, query, query_name, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/parasail_backend.py", line 30, in process_alignment
    fo = first_cigar(aln.cigar.decode.decode())
                     ^^^^^^^^^
  File "/usr/lib/python3/dist-packages/parasail/bindings_v2.py", line 403, in cigar
    return self.get_cigar()
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/parasail/bindings_v2.py", line 390, in get_cigar
    raise AttributeError("'Result' object has no traceback")
AttributeError: 'Result' object has no traceback. Did you mean: '_cigar'?
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper", line 572, in <module>
    main()
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper", line 509, in main
    for read, (segments, hits, usable_len) in backend(batch, executor,
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/chopper.py", line 150, in chopper_edlib
    for i, hits in enumerate(batch_hits):
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/edlib_backend.py", line 14, in find_locations
    for res in pool.map(_find_locations_single, zip(batch, [(all_primers, max_ed)] * len(batch))):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/process.py", line 642, in _chain_from_iterable_of_lists
    for element in iterable:
                   ^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
AttributeError: 'Result' object has no traceback

  0%|          | 0/1665 [00:00<?, ?it/s]
cmp: EOF on /<<PKGBUILDDIR>>/pychopper/tests/data/test_output.fq.gz which is empty
_____________________ TestIntegration.testIntegration_umi ______________________

self = <pychopper.tests.test_regression_simple.TestIntegration testMethod=testIntegration_umi>

    def testIntegration_umi(self):
        """ Integration test. """
        base = path.dirname(__file__)
        test_base = path.join(base, 'data')
    
        input_fasta = path.join(test_base, 'PCS111_umi_test_reads.fastq.gz')
        output_fasta = path.join(test_base, 'test_output_umi.fq.gz')
        expected_output = path.join(test_base, 'PCS111_umi_test_reads_expected.fastq')
    
        subprocess.call("{} {} {} {}".format('pychopper', "-U -m edlib -k PCS111", input_fasta, output_fasta), shell=True)
        retval = subprocess.call(['cmp', output_fasta, expected_output])
>       self.assertEqual(retval, 0)
E       AssertionError: 1 != 0

pychopper/tests/test_regression_simple.py:35: AssertionError
----------------------------- Captured stderr call -----------------------------
Using kit: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/primer_data/PCS111_primers.fas
Configurations to consider: "+:SSP,-VNP|-:VNP,-SSP"
Counting fastq records in input file: /<<PKGBUILDDIR>>/pychopper/tests/data/PCS111_umi_test_reads.fastq.gz
Total fastq records in input file: 4
Tuning the cutoff parameter (q) on 4 sampled reads (100.0%) passing quality filters (Q >= 7.0).
Optimizing over 30 cutoff values.

  0%|          | 0/30 [00:00<?, ?it/s]
  0%|          | 0/30 [00:00<?, ?it/s]
concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.12/concurrent/futures/process.py", line 263, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/process.py", line 212, in _process_chunk
    return [fn(*args) for args in chunk]
            ^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/edlib_backend.py", line 94, in _find_locations_single
    refined_locations = refine_locations(read, all_primers, all_locations)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/parasail_backend.py", line 54, in refine_locations
    aln = pair_align(seq[loc.RefStart:loc.RefEnd], all_primers[loc.Query], loc.Query, subs_mat, aln_params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/parasail_backend.py", line 45, in pair_align
    return process_alignment(aln, query, query_name, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/parasail_backend.py", line 30, in process_alignment
    fo = first_cigar(aln.cigar.decode.decode())
                     ^^^^^^^^^
  File "/usr/lib/python3/dist-packages/parasail/bindings_v2.py", line 403, in cigar
    return self.get_cigar()
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/parasail/bindings_v2.py", line 390, in get_cigar
    raise AttributeError("'Result' object has no traceback")
AttributeError: 'Result' object has no traceback. Did you mean: '_cigar'?
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper", line 572, in <module>
    main()
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper", line 468, in main
    in backend(batch, executor, qv, max(1000, int((len(read_sample)) / args.t))):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/chopper.py", line 150, in chopper_edlib
    for i, hits in enumerate(batch_hits):
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/edlib_backend.py", line 14, in find_locations
    for res in pool.map(_find_locations_single, zip(batch, [(all_primers, max_ed)] * len(batch))):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/process.py", line 642, in _chain_from_iterable_of_lists
    for element in iterable:
                   ^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
AttributeError: 'Result' object has no traceback
cmp: EOF on /<<PKGBUILDDIR>>/pychopper/tests/data/test_output_umi.fq.gz which is empty
=========================== short test summary info ============================
FAILED pychopper/tests/test_regression_simple.py::TestIntegration::testIntegration
FAILED pychopper/tests/test_regression_simple.py::TestIntegration::testIntegration_umi
========================= 2 failed, 2 passed in 2.58s ==========================
E: pybuild pybuild:389: test: plugin custom failed with: exit code=1: export PATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games; chmod +x /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper; PYTHONPATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build python3.12 -m pytest -v
	rm -fr -- /tmp/dh-xdg-rundir-bkd7fhbm
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12 --system=custom "--test-args=export PATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games; chmod +x /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pychopper/build/pychopper/scripts/pychopper; PYTHONPATH={build_dir} {interpreter} -m pytest -v" returned exit code 13
make[1]: *** [debian/rules:30: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:10: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T22:14:00Z

-------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/799470/

About the archive rebuild: The build was made on debusine.debian.net,
on arm64 using sbuild.

You can find the build task here:
https://debusine.debian.net/work-request/38973/

If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.

Thanks,

Stefano



More information about the Debian-med-packaging mailing list