bpo-40066: [Enum] fix tests (GH-30643)

- skip doctest that changes depending on target system
- skip doctest that only fails on CI
- substitute in values that change depending on target system
This commit is contained in:
Ethan Furman 2022-01-17 08:52:42 -08:00 committed by GitHub
parent a4bc2218d2
commit 62a6594e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View file

@ -373,8 +373,8 @@ class BasicSocketTests(unittest.TestCase):
# Make sure that the PROTOCOL_* constants have enum-like string
# reprs.
proto = ssl.PROTOCOL_TLS_CLIENT
self.assertEqual(repr(proto), '<_SSLMethod.PROTOCOL_TLS_CLIENT: 16>')
self.assertEqual(str(proto), '16')
self.assertEqual(repr(proto), '<_SSLMethod.PROTOCOL_TLS_CLIENT: %r>' % proto.value)
self.assertEqual(str(proto), str(proto.value))
ctx = ssl.SSLContext(proto)
self.assertIs(ctx.protocol, proto)