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

test_dumpspecs broken under python 3 #56

Closed
jhunkeler opened this issue Apr 4, 2018 · 0 comments
Closed

test_dumpspecs broken under python 3 #56

jhunkeler opened this issue Apr 4, 2018 · 0 comments
Labels

Comments

@jhunkeler
Copy link
Collaborator

The <skipped> must have been an accidental copy/paste on my part.

This would have never passed under Python 3.6 anyway, so we need to sanitize python ver = a little further under Python 3.

tests/test_describe.py:29: AssertionError
________________________________ test_dumpspecs ________________________________

    @pytest.mark.skipif(not HAS_IRAF, reason='Need IRAF to run')
    def test_dumpspecs():
        # get dumpspecs output
        out_f = six.StringIO()
        wutil.dumpspecs(outstream=out_f, skip_volatiles=True)
        out_str = out_f.getvalue()
        out_f.close()
    
        # modify out_str to remove a path that will always be changing
        out_str = '\n'.join([l for l in out_str.split('\n')
                             if 'python exec =' not in l])
        # modify out_str to handle old versions which printed Tkinter as camel-case
        out_str = out_str.replace('Tkinter', 'tkinter')
    
        # verify it (is version dependent)
        key = ('2' if IS_PY2 else '3', sys.platform.replace('2', ''))
        expected = REF[key]
>       assert expected.strip() == out_str.strip(), \
            'Unexpected output from wutil.dumpspecs: {}'.format(out_str)
E       AssertionError: Unexpected output from wutil.dumpspecs: python ver = 3.6
E         platform = linux
E         PY3K = True
E         c.OF_GRAPHICS = False
E         /dev/console owner = <skipped>
E         tkinter use unattempted.
E         
E       assert 'python ver =... unattempted.' == 'python ver = ... unattempted.'
E         - python ver = 3<skipped>
E         + python ver = 3.6
E           platform = linux
E           PY3K = True
E           c.OF_GRAPHICS = False
E           /dev/console owner = <skipped>
E           tkinter use unattempted.

tests/test_graphics.py:194: AssertionError```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant