-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't accept bytes message in pytest.{fail,xfail,skip}
It seems to have been added in #1439 to fix #1178. This was only relevant for Python 2 where it was tempting to use str (== bytes) literals instead of unicode literals. In Python 3, it is unlikely that anyone passes bytes to these functions.
- Loading branch information
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
``pytest.fail``, ``pytest.xfail`` and ``pytest.skip`` no longer support bytes for the message argument. | ||
|
||
This was supported for Python 2 where it was tempting to use ``"message"`` | ||
instead of ``u"message"``. | ||
|
||
Python 3 code is unlikely to pass ``bytes`` to these functions. If you do, | ||
please decode it to an ``str`` beforehand. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters