Skip to content

Commit eed21e0

Browse files
committed
Sort yml items to get same results for regendoc runs
1 parent a6b2732 commit eed21e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/en/example/nonpython/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class YamlFile(pytest.File):
1010
def collect(self):
1111
import yaml # we need a yaml parser, e.g. PyYAML
1212
raw = yaml.safe_load(self.fspath.open())
13-
for name, spec in raw.items():
13+
for name, spec in sorted(raw.items()):
1414
yield YamlItem(name, self, spec)
1515

1616
class YamlItem(pytest.Item):
@@ -19,7 +19,7 @@ def __init__(self, name, parent, spec):
1919
self.spec = spec
2020

2121
def runtest(self):
22-
for name, value in self.spec.items():
22+
for name, value in sorted(self.spec.items()):
2323
# some custom test execution (dumb example follows)
2424
if name != value:
2525
raise YamlException(self, name, value)

0 commit comments

Comments
 (0)