fix issue307 - use yaml.safe_load instead of yaml.load, thanks Mark Eichin.

This commit is contained in:
holger krekel
2013-05-16 09:59:48 +02:00
parent 5a1ce3c45c
commit e6e86fa462
2 changed files with 3 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ def pytest_collect_file(parent, path):
class YamlFile(pytest.File):
def collect(self):
import yaml # we need a yaml parser, e.g. PyYAML
raw = yaml.load(self.fspath.open())
raw = yaml.safe_load(self.fspath.open())
for name, spec in raw.items():
yield YamlItem(name, self, spec)