mirror of https://github.com/tc39/test262.git
parent
4d31d84531
commit
c4e5d69044
|
@ -154,20 +154,20 @@ class Template:
|
|||
features += self.attribs['meta'].get('features', [])
|
||||
features = list(OrderedDict.fromkeys(features))
|
||||
if len(features):
|
||||
lines += ['features: ' + re.sub('\n\s*', ' ', yaml.dump(features).strip())]
|
||||
lines += ['features: ' + re.sub('\n\s*', ' ', yaml.dump(features, default_flow_style=True).strip())]
|
||||
|
||||
flags = ['generated']
|
||||
flags += case_values['meta'].get('flags', [])
|
||||
flags += self.attribs['meta'].get('flags', [])
|
||||
flags = list(OrderedDict.fromkeys(flags))
|
||||
lines += ['flags: ' + re.sub('\n\s*', ' ', yaml.dump(flags).strip())]
|
||||
lines += ['flags: ' + re.sub('\n\s*', ' ', yaml.dump(flags, default_flow_style=True).strip())]
|
||||
|
||||
includes = []
|
||||
includes += case_values['meta'].get('includes', [])
|
||||
includes += self.attribs['meta'].get('includes', [])
|
||||
includes = list(OrderedDict.fromkeys(includes))
|
||||
if len(includes):
|
||||
lines += ['includes: ' + re.sub('\n\s*', ' ', yaml.dump(includes).strip())]
|
||||
lines += ['includes: ' + re.sub('\n\s*', ' ', yaml.dump(includes, default_flow_style=True).strip())]
|
||||
|
||||
if case_values['meta'].get('negative'):
|
||||
if self.attribs['meta'].get('negative'):
|
||||
|
|
|
@ -1 +1 @@
|
|||
PyYAML==3.11
|
||||
PyYAML==5.1.2
|
||||
|
|
|
@ -9,7 +9,7 @@ class CheckHarnessFeatures(Check):
|
|||
|
||||
def __init__(self):
|
||||
with open('./harness/features.yml', 'r') as f:
|
||||
self.include_has_features = yaml.load(f.read())
|
||||
self.include_has_features = yaml.safe_load(f.read())
|
||||
|
||||
def comparison_result_lists(self, meta):
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ def parse(src):
|
|||
return None
|
||||
|
||||
try:
|
||||
return yaml.load(match.group(1))
|
||||
return yaml.safe_load(match.group(1))
|
||||
except (yaml.scanner.ScannerError, yaml.parser.ParserError):
|
||||
return None
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
PyYAML==3.11
|
||||
PyYAML==5.1.2
|
||||
inflect==0.2.5
|
||||
|
|
Loading…
Reference in New Issue