-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Farbod Ahmadian
committed
Jun 20, 2024
1 parent
15712a5
commit d6f3559
Showing
2 changed files
with
39 additions
and
0 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
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,38 @@ | ||
The readability of assertion introspection of bound methods has been enhanced | ||
-- by :user:`farbodahm`, :user:`webknjaz`, :user:`obestwalter`, :user:`flub` | ||
and :user:`glyphack`. | ||
|
||
Previously it was something like this: | ||
|
||
.. code-block:: console | ||
=================================== FAILURES =================================== | ||
_____________________________________ test _____________________________________ | ||
def test(): | ||
> assert Help().fun() == 2 | ||
E assert 1 == 2 | ||
E + where 1 = <bound method Help.fun of <example.Help instance at 0x256a830>>() | ||
E + where <bound method Help.fun of <example.Help instance at 0x256a830>> = <example.Help instance at 0x256a830>.fun | ||
E + where <example.Help instance at 0x256a830> = Help() | ||
example.py:7: AssertionError | ||
=========================== 1 failed in 0.03 seconds =========================== | ||
And now it's like: | ||
|
||
.. code-block:: console | ||
=================================== FAILURES =================================== | ||
_____________________________________ test _____________________________________ | ||
def test(): | ||
> assert Help().fun() == 2 | ||
E assert 1 == 2 | ||
E + where 1 = fun() | ||
E + where fun = <test_local.Help object at 0x1074be230>.fun | ||
E + where <test_local.Help object at 0x1074be230> = Help() | ||
test_local.py:13: AssertionError | ||
=========================== 1 failed in 0.03 seconds =========================== |