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

Skip to content

Commit d74b449

Browse files
committed
Fix missing assertHasAttr
1 parent 26eedbc commit d74b449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_structseq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_copy_replace_with_invisible_fields(self):
170170
(2000, 2, 1, 0, 0, 0, 3, 1, 0))
171171

172172
# named invisible fields
173-
self.assertHasAttr(t, 'tm_zone')
173+
self.assertTrue(hasattr(t, 'tm_zone'), f"{t} has no attribute 'tm_zone'")
174174
with self.assertRaisesRegex(AttributeError, 'readonly attribute'):
175175
t.tm_zone = 'some other zone'
176176
t2 = copy.replace(t, tm_zone='some other zone')

0 commit comments

Comments
 (0)