Update web-platform-tests to revision 7a6f5673ff5d146ca5c09c6a1b42b7706cfee328

This commit is contained in:
WPT Sync Bot 2018-06-28 21:05:13 -04:00
parent e2fca1b228
commit 4787b28da3
261 changed files with 8195 additions and 4689 deletions

View file

@ -13,7 +13,7 @@ import sys
import threading
import time
import traceback
import urllib2
from six.moves import urllib
import uuid
from collections import defaultdict, OrderedDict
from multiprocessing import Process, Event
@ -444,10 +444,10 @@ def check_subdomains(config):
connected = False
for i in range(10):
try:
urllib2.urlopen("http://%s:%d/" % (host, port))
urllib.request.urlopen("http://%s:%d/" % (host, port))
connected = True
break
except urllib2.URLError:
except urllib.error.URLError:
time.sleep(1)
if not connected:
@ -460,7 +460,7 @@ def check_subdomains(config):
continue
try:
urllib2.urlopen("http://%s:%d/" % (domain, port))
urllib.request.urlopen("http://%s:%d/" % (domain, port))
except Exception:
logger.critical("Failed probing domain %s. "
"You may need to edit /etc/hosts or similar, see README.md." % domain)

View file

@ -1,6 +1,7 @@
import pickle
import platform
import os
import sys
import pytest
@ -11,6 +12,7 @@ from .serve import Config
@pytest.mark.skipif(platform.uname()[0] == "Windows",
reason="Expected contents are platform-dependent")
@pytest.mark.xfail(sys.version_info >= (3,), reason="serve only works on Py2")
def test_make_hosts_file_nix():
c = Config(browser_host="foo.bar", alternate_hosts={"alt": "foo2.bar"})
hosts = serve.make_hosts_file(c, "192.168.42.42")
@ -32,6 +34,7 @@ def test_make_hosts_file_nix():
@pytest.mark.skipif(platform.uname()[0] != "Windows",
reason="Expected contents are platform-dependent")
@pytest.mark.xfail(sys.version_info >= (3,), reason="serve only works on Py2")
def test_make_hosts_file_windows():
c = Config(browser_host="foo.bar", alternate_hosts={"alt": "foo2.bar"})
hosts = serve.make_hosts_file(c, "192.168.42.42")