Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test fail: astropy.utils.exceptions.AstropyDeprecationWarning #547

Closed
Hellseher opened this issue May 11, 2024 · 3 comments
Closed

Comments

@Hellseher
Copy link

Hi,

During monthly refresh of astro related packages in Guix I've faced with the
issue where pyvo@1.5.1 has one unit tests failed when astropy is bumped to
6.1.0

=================================== FAILURES ===================================
___________________ TestTables.test_single_table_description ___________________

self = <pyvo.io.vosi.tests.test_tables.TestTables object at 0x7fff68448f10>

    def test_single_table_description(self):
        """Test describing a table with a single description
        """
        tableset = vosi.parse_tables(
            get_pkg_data_filename(
                "data/tables/single_table_description.xml"))
        onedesc_table = tableset.get_first_table()
        describe_string = 'A test table with a single description'
        assert describe_string in onedesc_table.description

        with io.StringIO() as buf, contextlib.redirect_stdout(buf):
>           onedesc_table.describe()

pyvo/io/vosi/tests/test_tables.py:401:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyvo/io/vosi/vodataservice.py:321: in describe
    print(indent(self.description))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('A test table with a single description',), kwargs = {}
category = <class 'astropy.utils.exceptions.AstropyDeprecationWarning'>

    def deprecated_func(*args, **kwargs):
        if pending:
            category = AstropyPendingDeprecationWarning
        else:
            category = warning_type

>       warnings.warn(message, category, stacklevel=2)
E       astropy.utils.exceptions.AstropyDeprecationWarning: The indent function is deprecated and may be removed in a future version.
E               Use textwrap.indent() instead.

/gnu/store/8f7d54vwk07r6z2vdkjk8frbdh2mkvvx-python-astropy-6.1.0/lib/python3.10/site-packages/astropy/utils/decorators.py:131: AstropyDeprecationWarning
=========================== short test summary info ============================
FAILED pyvo/io/vosi/tests/test_tables.py::TestTables::test_single_table_description
============= 1 failed, 307 passed, 43 skipped, 1 xfailed in 2.33s =============

Inputs:

  • python-pytest-astropy@0.11.0
  • python-requests-mock@1.8.0
  • python-setuptools-scm@7.1.0
  • python-astropy@6.1.0
  • python-pillow@9.2.0
  • python-requests@2.28.1

Thanks,
Oleg

@bsipocz
Copy link
Member

bsipocz commented May 12, 2024

Thanks Oleg for the report. This has been fixed by #539

@bsipocz bsipocz closed this as completed May 12, 2024
@Hellseher
Copy link
Author

I guess that changes will be availalbe in the next release.

@bsipocz
Copy link
Member

bsipocz commented May 13, 2024

Yes. Either 1.5.2 or 1.6, whichever comes first, we likely will come up with a plan or ETA next week when some of the maintainers will be in the same room.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants