Skip to content

Commit

Permalink
Sybil 5.0.2 *and* Python 3.6 compatibility 🙄
Browse files Browse the repository at this point in the history
  • Loading branch information
cjw296 committed May 20, 2023
1 parent 57ccab2 commit 05c9c37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/comparing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,12 @@ If is it important that the two values being compared are of exactly
the same type, rather than just being equal as far as Python is
concerned, then the strict mode of :func:`compare` should be used.

.. invisible-code-block: python

# Sybil 5.0.2 above above set this to __test__, but it needs to be
# __main__ for Python 3.6 compatibility:
__name__ = '__main__'

For example, these two instances will normally appear to be equal
provided the elements within them are the same:

Expand All @@ -642,7 +648,7 @@ should be used:
>>> compare(TypeA(1), TypeB(1), strict=True)
Traceback (most recent call last):
...
AssertionError: A(x=1) (<class '__test__.A'>) != B(x=1) (<class '__test__.B'>)
AssertionError: A(x=1) (<class '__main__.A'>) != B(x=1) (<class '__main__.B'>)

.. _comparison-objects:

Expand Down

0 comments on commit 05c9c37

Please sign in to comment.