From eed21e06dbb61899e9c14352750258aa81cc5d3c Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 1 Aug 2016 18:37:52 -0400 Subject: [PATCH] Sort yml items to get same results for regendoc runs --- doc/en/example/nonpython/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/example/nonpython/conftest.py b/doc/en/example/nonpython/conftest.py index 2406e8f10..baff30015 100644 --- a/doc/en/example/nonpython/conftest.py +++ b/doc/en/example/nonpython/conftest.py @@ -10,7 +10,7 @@ class YamlFile(pytest.File): def collect(self): import yaml # we need a yaml parser, e.g. PyYAML raw = yaml.safe_load(self.fspath.open()) - for name, spec in raw.items(): + for name, spec in sorted(raw.items()): yield YamlItem(name, self, spec) class YamlItem(pytest.Item): @@ -19,7 +19,7 @@ class YamlItem(pytest.Item): self.spec = spec def runtest(self): - for name, value in self.spec.items(): + for name, value in sorted(self.spec.items()): # some custom test execution (dumb example follows) if name != value: raise YamlException(self, name, value)