Skip to content

test_quantity_array_methods error with numpy release candicate #3471

Closed

Description

@olebole

If the numpy version number has an "rc" in it, some tests give errors because of:

_____ ERROR collecting astropy/units/tests/test_quantity_array_methods.py ______
astropy/units/tests/test_quantity_array_methods.py:11: in <module>
>   NUMPY_LT_1P9P1 = [int(x) for x in np.__version__.split('.')[:3]] < [1, 9, 1]
E   ValueError: invalid literal for int() with base 10: '0rc1'

Here, Numpy is 1.9.0rc1, Platform is Debian (inofficial) on x32. Full log

Activity

  1. embray commented on Feb 10, 2015

    @embray
    Member

    Thanks--this should probably be fixed by #3389. I was holding back on merging that as it seemed non-critical. But now that there is an actual bug case (as I was worried their might be when I saw that same code, though I had never directly encountered an issue with it) it might be worth merging my fix.

  2. eteq commented on Feb 10, 2015

    @eteq
    Member

    @olebole - can you check that #3389 fixed this, and close this if so? Thanks!

  3. olebole commented on Feb 11, 2015

    @olebole
    MemberAuthor

    Sorry, I don't have access to an x32 machine unti tomorrow evening, and the change seems too complicated to just test it somewhere else.

  4. embray commented on Feb 11, 2015

    @embray
    Member

    It should be fixed, in any case. The code that's bugging out there simply no longer exists, and this version comparison is handled correctly by pkg_resources:

    >>> from pkg_resources import parse_version
    >>> parse_version('1.9.0rc1') < parse_version('1.9.1')
    True
  5. olebole commented on Feb 11, 2015

    @olebole
    MemberAuthor

    OK, so I am closing this. If this reappears with 1.0, I will just re-open.

  6. added 2 commits that reference this issue on Feb 11, 2015
  7. embray commented on Feb 11, 2015

    @embray
    Member

    I went ahead and reported this as fixed in f04c3a1, but I will roll that back if it turns out not to be somehow.

  8. embray commented on Feb 11, 2015

    @embray
    Member

    Okay, thanks.

  9. added this to the v1.0.0 milestone on Feb 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions