bpo-30231: Remove skipped test_imaplib tests (#1419) (#2192) · python/cpython@8a39af9 (original) (raw)

`@@ -13,7 +13,7 @@

`

13

13

`import inspect

`

14

14

``

15

15

`from test.support import (reap_threads, verbose, transient_internet,

`

16

``

`-

run_with_tz, run_with_locale)

`

``

16

`+

run_with_tz, run_with_locale, cpython_only)

`

17

17

`import unittest

`

18

18

`from unittest import mock

`

19

19

`from datetime import datetime, timezone, timedelta

`

`@@ -504,6 +504,15 @@ def test_ssl_verified(self):

`

504

504

`ssl_context=ssl_context)

`

505

505

`client.shutdown()

`

506

506

``

``

507

`+

Mock the private method _connect(), so mark the test as specific

`

``

508

`+

to CPython stdlib

`

``

509

`+

@cpython_only

`

``

510

`+

def test_certfile_arg_warn(self):

`

``

511

`+

with support.check_warnings(('', DeprecationWarning)):

`

``

512

`+

with mock.patch.object(self.imap_class, 'open'):

`

``

513

`+

with mock.patch.object(self.imap_class, '_connect'):

`

``

514

`+

self.imap_class('localhost', 143, certfile=CERTFILE)

`

``

515

+

507

516

`class ThreadedNetworkedTests(unittest.TestCase):

`

508

517

`server_class = socketserver.TCPServer

`

509

518

`imap_class = imaplib.IMAP4

`

`@@ -966,25 +975,6 @@ def test_logincapa(self):

`

966

975

`_server = self.imap_class(self.host, self.port)

`

967

976

`self.check_logincapa(_server)

`

968

977

``

969

``

`-

@unittest.skipIf(True,

`

970

``

`-

"bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "

`

971

``

`-

"our randomly generated client x509 certificate anymore")

`

972

``

`-

def test_logincapa_with_client_certfile(self):

`

973

``

`-

with transient_internet(self.host):

`

974

``

`-

with support.check_warnings(('', DeprecationWarning)):

`

975

``

`-

_server = self.imap_class(self.host, self.port,

`

976

``

`-

certfile=CERTFILE)

`

977

``

`-

self.check_logincapa(_server)

`

978

``

-

979

``

`-

@unittest.skipIf(True,

`

980

``

`-

"bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "

`

981

``

`-

"our randomly generated client x509 certificate anymore")

`

982

``

`-

def test_logincapa_with_client_ssl_context(self):

`

983

``

`-

with transient_internet(self.host):

`

984

``

`-

_server = self.imap_class(

`

985

``

`-

self.host, self.port, ssl_context=self.create_ssl_context())

`

986

``

`-

self.check_logincapa(_server)

`

987

``

-

988

978

`def test_logout(self):

`

989

979

`with transient_internet(self.host):

`

990

980

`_server = self.imap_class(self.host, self.port)

`