bpo-46178: Remove/rename redundant Travis CI code (#30309) · python/cpython@2cf7d02 (original) (raw)

`@@ -28,13 +28,6 @@ def wrapped(*args, **kwargs):

`

28

28

`return _retry_thrice(func, exc, *args, **kwargs)

`

29

29

`return wrapped

`

30

30

``

31

``

`-

bpo-35411: FTP tests of test_urllib2net randomly fail

`

32

``

`-

with "425 Security: Bad IP connecting" on Travis CI

`

33

``

`-

skip_ftp_test_on_travis = unittest.skipIf('TRAVIS' in os.environ,

`

34

``

`-

'bpo-35411: skip FTP test '

`

35

``

`-

'on Travis CI')

`

36

``

-

37

``

-

38

31

`# Connecting to remote hosts is flaky. Make it more robust by retrying

`

39

32

`# the connection several times.

`

40

33

`_urlopen_with_retry = _wrap_with_retry_thrice(urllib.request.urlopen,

`

`@@ -139,7 +132,6 @@ def setUp(self):

`

139

132

`# XXX The rest of these tests aren't very good -- they don't check much.

`

140

133

`# They do sometimes catch some major disasters, though.

`

141

134

``

142

``

`-

@skip_ftp_test_on_travis

`

143

135

`def test_ftp(self):

`

144

136

`urls = [

`

145

137

`'ftp://www.pythontest.net/README',

`

`@@ -339,15 +331,13 @@ def test_http_timeout(self):

`

339

331

``

340

332

`FTP_HOST = 'ftp://www.pythontest.net/'

`

341

333

``

342

``

`-

@skip_ftp_test_on_travis

`

343

334

`def test_ftp_basic(self):

`

344

335

`self.assertIsNone(socket.getdefaulttimeout())

`

345

336

`with socket_helper.transient_internet(self.FTP_HOST, timeout=None):

`

346

337

`u = _urlopen_with_retry(self.FTP_HOST)

`

347

338

`self.addCleanup(u.close)

`

348

339

`self.assertIsNone(u.fp.fp.raw._sock.gettimeout())

`

349

340

``

350

``

`-

@skip_ftp_test_on_travis

`

351

341

`def test_ftp_default_timeout(self):

`

352

342

`self.assertIsNone(socket.getdefaulttimeout())

`

353

343

`with socket_helper.transient_internet(self.FTP_HOST):

`

`@@ -359,7 +349,6 @@ def test_ftp_default_timeout(self):

`

359

349

`socket.setdefaulttimeout(None)

`

360

350

`self.assertEqual(u.fp.fp.raw._sock.gettimeout(), 60)

`

361

351

``

362

``

`-

@skip_ftp_test_on_travis

`

363

352

`def test_ftp_no_timeout(self):

`

364

353

`self.assertIsNone(socket.getdefaulttimeout())

`

365

354

`with socket_helper.transient_internet(self.FTP_HOST):

`

`@@ -371,7 +360,6 @@ def test_ftp_no_timeout(self):

`

371

360

`socket.setdefaulttimeout(None)

`

372

361

`self.assertIsNone(u.fp.fp.raw._sock.gettimeout())

`

373

362

``

374

``

`-

@skip_ftp_test_on_travis

`

375

363

`def test_ftp_timeout(self):

`

376

364

`with socket_helper.transient_internet(self.FTP_HOST):

`

377

365

`u = _urlopen_with_retry(self.FTP_HOST, timeout=60)

`