Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7

This commit is contained in:
Ms2ger 2016-06-24 10:13:49 +02:00
parent 581c8ba1c8
commit 79b1e6c40c
1728 changed files with 20243 additions and 5349 deletions

View file

@ -1,16 +1,20 @@
import imp
import os
import urlparse
from six.moves.urllib.parse import urljoin
from fnmatch import fnmatch
try:
from xml.etree import cElementTree as ElementTree
except ImportError:
from xml.etree import ElementTree
here = os.path.dirname(__file__)
localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py")))
import html5lib
import vcs
from item import Stub, ManualTest, WebdriverSpecTest, RefTest, TestharnessTest
from utils import rel_path_to_url, is_blacklisted, ContextManagerStringIO, cached_property
from . import vcs
from .item import Stub, ManualTest, WebdriverSpecTest, RefTest, TestharnessTest
from .utils import rel_path_to_url, is_blacklisted, ContextManagerStringIO, cached_property
wd_pattern = "*.py"
@ -74,7 +78,7 @@ class SourceFile(object):
blob = git("show", "HEAD:%s" % self.rel_path)
file_obj = ContextManagerStringIO(blob)
else:
file_obj = open(self.path)
file_obj = open(self.path, 'rb')
return file_obj
@property
@ -267,7 +271,7 @@ class SourceFile(object):
rel_map = {"match": "==", "mismatch": "!="}
for item in self.reftest_nodes:
if "href" in item.attrib:
ref_url = urlparse.urljoin(self.url, item.attrib["href"])
ref_url = urljoin(self.url, item.attrib["href"])
ref_type = rel_map[item.attrib["rel"]]
rv.append((ref_url, ref_type))
return rv