mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 36634cbcf3253dfe8d220990a27ad4eeebf8ec2f
This commit is contained in:
parent
0964d055cd
commit
7295abcc2a
245 changed files with 5966 additions and 1901 deletions
|
@ -2,11 +2,12 @@ import io
|
|||
import json
|
||||
import os
|
||||
import ssl
|
||||
import urllib2
|
||||
|
||||
import html5lib
|
||||
import pytest
|
||||
from selenium import webdriver
|
||||
from six import text_type
|
||||
from six.moves import urllib
|
||||
|
||||
from wptserver import WPTServer
|
||||
|
||||
|
@ -63,8 +64,8 @@ class HTMLItem(pytest.Item, pytest.Collector):
|
|||
# Some tests are reliant on the WPT servers substitution functionality,
|
||||
# so tests must be retrieved from the server rather than read from the
|
||||
# file system directly.
|
||||
handle = urllib2.urlopen(self.url,
|
||||
context=parent.session.config.ssl_context)
|
||||
handle = urllib.request.urlopen(self.url,
|
||||
context=parent.session.config.ssl_context)
|
||||
try:
|
||||
markup = handle.read()
|
||||
finally:
|
||||
|
@ -87,7 +88,7 @@ class HTMLItem(pytest.Item, pytest.Collector):
|
|||
continue
|
||||
if element.tag == 'script':
|
||||
if element.attrib.get('id') == 'expected':
|
||||
self.expected = json.loads(unicode(element.text))
|
||||
self.expected = json.loads(text_type(element.text))
|
||||
|
||||
src = element.attrib.get('src', '')
|
||||
|
||||
|
@ -186,7 +187,7 @@ class HTMLItem(pytest.Item, pytest.Collector):
|
|||
@staticmethod
|
||||
def _assert_sequence(nums):
|
||||
if nums and len(nums) > 0:
|
||||
assert nums == range(1, nums[-1] + 1)
|
||||
assert nums == list(range(1, nums[-1] + 1))
|
||||
|
||||
@staticmethod
|
||||
def _scrub_stack(test_obj):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue