mirror of
https://github.com/servo/servo.git
synced 2025-09-06 04:58:21 +01:00
Update web-platform-tests to revision 4adce83d1f2b08fa2e92427c4687d0cf535aee53
This commit is contained in:
parent
d3763452b5
commit
3e4ec1724a
102 changed files with 3019 additions and 1309 deletions
|
@ -1,3 +1,4 @@
|
|||
import json
|
||||
import logging
|
||||
import pickle
|
||||
|
||||
|
@ -43,6 +44,16 @@ def test_logger_preserved():
|
|||
assert c.logger is logger
|
||||
|
||||
|
||||
def test_as_dict():
|
||||
with config.ConfigBuilder() as c:
|
||||
assert c.as_dict() is not None
|
||||
|
||||
|
||||
def test_as_dict_is_json():
|
||||
with config.ConfigBuilder() as c:
|
||||
assert json.dumps(c.as_dict()) is not None
|
||||
|
||||
|
||||
def test_init_basic_prop():
|
||||
with config.ConfigBuilder(browser_host="foo.bar") as c:
|
||||
assert c.browser_host == "foo.bar"
|
||||
|
|
|
@ -75,7 +75,9 @@ def json_types(obj):
|
|||
return {key: json_types(value) for key, value in iteritems(obj)}
|
||||
if (isinstance(obj, string_types) or
|
||||
isinstance(obj, integer_types) or
|
||||
isinstance(obj, float)):
|
||||
isinstance(obj, float) or
|
||||
isinstance(obj, bool) or
|
||||
obj is None):
|
||||
return obj
|
||||
if isinstance(obj, list) or hasattr(obj, "__iter__"):
|
||||
return [json_types(value) for value in obj]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue