[Debian-astro-maintainers] Bug#934959: python-mock breaks sunpy autopkgtest

Paul Gevers elbrus at debian.org
Sat Aug 17 10:59:44 BST 2019


Source: python-mock, sunpy
Control: found -1 python-mock/3.0.5-1
Control: found -1 sunpy/0.9.6-2
Severity: serious
X-Debbugs-CC: debian-ci at lists.debian.org
User: debian-ci at lists.debian.org
Usertags: breaks needs-update

Dear maintainers,

With a recent (one month old) upload of python-mock the autopkgtest of
sunpy fails in testing when that autopkgtest is run with the binary
packages of python-mock from unstable. It passes when run with only
packages from testing. In tabular form:
                       pass            fail
python-mock            from testing    3.0.5-1
sunpy                  from testing    0.9.6-2
all others             from testing    from testing

I copied some of the output at the bottom of this report. (On top of
that, there are *loads* of deprecation warnings, the maintainer of sunpy
probably wants to look into that).

Currently this regression is blocking the migration of python-mock to
testing [1]. Due to the nature of this issue, I filed this bug report
against both packages. Can you please investigate the situation and
reassign the bug to the right package? If needed, please change the
bug's severity.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=python-mock

https://ci.debian.net/data/autopkgtest/testing/amd64/s/sunpy/2748790/log.gz

=================================== FAILURES
===================================
________________________ test_parse_obssumm_dbase_file
_________________________

    def test_parse_obssumm_dbase_file():
        """
        Ensure that all required data are extracted from the RHESSI
        observing summary database file mocked in `hessi_data()`
        """
        mock_file = mock.mock_open()
        mock_file.return_value.__iter__.return_value = hessi_data()

        dbase_data = {}
        with mock.patch('sunpy.instr.rhessi.open', mock_file, create=True):
>           dbase_data = rhessi.parse_obssumm_dbase_file(None)

/usr/lib/python3/dist-packages/sunpy/instr/tests/test_rhessi.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

filename = None

    def parse_obssumm_dbase_file(filename):
        """
        Parse the RHESSI observing summary database file. This file
lists the
        name of observing summary files for specific time ranges along
with other
        info

        Parameters
        ----------
        filename : `str`
            The filename of the obssumm dbase file.

        Returns
        -------
        out : `dict`
            Return a `dict` containing the parsed data in the dbase file.

        Examples
        --------
        >>> import sunpy.instr.rhessi as rhessi
        >>> fname, _ = rhessi.get_obssumm_dbase_file(('2011/04/04',
'2011/04/05'))   # doctest: +REMOTE_DATA
        >>> file_names = rhessi.parse_obssumm_dbase_file(fname)   #
doctest: +REMOTE_DATA
        >>> file_names['filename'][::5]   # doctest: +REMOTE_DATA
        ['hsi_obssumm_20110401_043.fit', 'hsi_obssumm_20110406_041.fit',
'hsi_obssumm_20110411_024.fit', 'hsi_obssumm_20110416_016.fit',
'hsi_obssumm_20110421_025.fit', 'hsi_obssumm_20110426_022.fit']

        References
        ----------
        |
https://hesperia.gsfc.nasa.gov/ssw/hessi/doc/guides/hessi_data_access.htm#Observing%20Summary%20Data

        .. note::
            This API is currently limited to providing data from whole
days only.

        """
        # An example dbase file can be found at:
        #
https://hesperia.gsfc.nasa.gov/hessidata/dbase/hsi_obssumm_filedb_200311.txt

        with open(filename) as fd:
            reader = csv.reader(fd, delimiter=' ', skipinitialspace=True)
>           _ = next(reader)  # skip 'HESSI Filedb File:' row
E           StopIteration

/usr/lib/python3/dist-packages/sunpy/instr/rhessi.py:145: StopIteration

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-astro-maintainers/attachments/20190817/3027083c/attachment.sig>


More information about the Debian-astro-maintainers mailing list