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

TST: CircleCI 32-bit job is broken #8934

Closed
pllim opened this issue Jun 29, 2019 · 3 comments · Fixed by #8954
Closed

TST: CircleCI 32-bit job is broken #8934

pllim opened this issue Jun 29, 2019 · 3 comments · Fixed by #8954
Labels
Affects-dev PRs and issues that do not impact an existing Astropy release testing

Comments

@pllim
Copy link
Member

pllim commented Jun 29, 2019

Example log from master: https://circleci.com/gh/astropy/astropy/35792

There are 96 failures. One of them:

astropy/coordinates/tests/test_frames.py:522: AssertionError
______________________________ test_dynamic_attrs ______________________________
[gw3] linux -- Python 3.5.7 /opt/python/cp35-cp35m/bin/python

    def test_dynamic_attrs():
        from astropy.coordinates.builtin_frames import ICRS
        c = ICRS(1*u.deg, 2*u.deg)
        assert 'ra' in dir(c)
        assert 'dec' in dir(c)
    
        with pytest.raises(AttributeError) as err:
            c.blahblah
>       assert "object has no attribute 'blahblah'" in str(err)
E       assert "object has no attribute 'blahblah'" in '<ExceptionInfo AttributeError tblen=2>'
E        +  where '<ExceptionInfo AttributeError tblen=2>' = str(<ExceptionInfo AttributeError tblen=2>)
@pllim pllim added testing Affects-dev PRs and issues that do not impact an existing Astropy release coordinates and removed coordinates labels Jun 29, 2019
@pllim
Copy link
Member Author

pllim commented Jun 29, 2019

Could be related to pytest 5.0 release if they changed the str(e) behavior when you catch the exception in pytest.raises(). To test that theory, you can roll back to pytest 4.x series in 32-bit container and see if the tests pass again. 🤷‍♀

@dhomeier
Copy link
Contributor

dhomeier commented Jul 1, 2019

This seems to be the relevant change. Looks like the solution would be to substitute with str(e.value).
I've tested this on a local pytest 5.0.0 installation, which raised the same errors for test_angles.py, and it did work (and also works back with pytest 3.10.1).

A quick grep shows that 63 of our tests already have that syntax, which only leaves 90-119 to fix (not sure about the 20-something that do not appear to throw errors). 💯

@bsipocz
Copy link
Member

bsipocz commented Jul 1, 2019

Thank you @dhomeier. Since you've already made the changes, would you mind opening a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects-dev PRs and issues that do not impact an existing Astropy release testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants