Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d2dded

Browse files
committed
test_descr started breaking in yet another way in the same place.
1 parent 76e6963 commit 4d2dded

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Lib/test/test_descr.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,9 @@ def __getitem__(self, i):
881881
verify(c1 != c2)
882882
verify(not c1 != c1)
883883
verify(not c1 == c2)
884-
verify(str(c1).startswith('<C object at '))
884+
# Note that the module name appears in str/repr, and that varies
885+
# depending on whether this test is run standalone or from a framework.
886+
verify(str(c1).find('C instance at ') >= 0)
885887
verify(str(c1) == repr(c1))
886888
verify(-1 not in c1)
887889
for i in range(10):
@@ -902,7 +904,9 @@ def __getitem__(self, i):
902904
verify(d1 != d2)
903905
verify(not d1 != d1)
904906
verify(not d1 == d2)
905-
verify(str(d1).startswith('<D object at '))
907+
# Note that the module name appears in str/repr, and that varies
908+
# depending on whether this test is run standalone or from a framework.
909+
verify(str(d1).find('D instance at ') >= 0)
906910
verify(str(d1) == repr(d1))
907911
verify(-1 not in d1)
908912
for i in range(10):

0 commit comments

Comments
 (0)