Skip to content

cannot make unicode match assertions with pytest.raises python2 pytest #5478

@graingert

Description

@graingert
    def test_u():
        with pytest.raises(AssertionError, match=u"\u2603"):
>           assert False, u"\u2603"
E           UnicodeEncodeError: 'ascii' codec can't encode character u'\u2603' in position 0: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions