changeset 1160:cf6b2bf042fb

tests: Fix YAML warning in tests.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 01 Oct 2019 07:33:15 -0700
parents 6baa94da8b16
children 356ffb974e47
files tests/conftest.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/conftest.py	Wed Jun 12 09:42:50 2019 -0700
+++ b/tests/conftest.py	Tue Oct 01 07:33:15 2019 -0700
@@ -82,7 +82,8 @@
 
 class YamlTestFileBase(pytest.File):
     def collect(self):
-        spec = yaml.load_all(self.fspath.open(encoding='utf8'))
+        spec = yaml.load_all(self.fspath.open(encoding='utf8'),
+                             Loader=yaml.SafeLoader)
         for i, item in enumerate(spec):
             name = '%s_%d' % (self.fspath.basename, i)
             if 'test_name' in item: