Avoid potentially random collection order for xdist compartibility. closes #138

This commit is contained in:
Anatoly Bubenkov 2015-08-04 15:49:05 +02:00
parent 8197f6704d
commit 4610ef5580
4 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
Changelog
=========
2.14.2
2.14.3
------
- Avoid potentially random collection order for xdist compartibility (bubenkoff)

View File

@ -3,6 +3,6 @@
from pytest_bdd.steps import given, when, then
from pytest_bdd.scenario import scenario, scenarios
__version__ = '2.14.2'
__version__ = '2.14.3'
__all__ = [given.__name__, when.__name__, then.__name__, scenario.__name__, scenarios.__name__]

View File

@ -23,8 +23,9 @@ Syntax example:
one line.
"""
import codecs
from collections import OrderedDict
from os import path as op
import codecs
import re
import sys
import textwrap
@ -238,7 +239,7 @@ class Feature(object):
:param bool strict_gherkin: Flag whether it's a strictly gherkin scenario or not (e.g. it will validate correct
gherkin language (given-when-then))
"""
self.scenarios = {}
self.scenarios = OrderedDict()
self.rel_filename = op.join(op.basename(basedir), filename)
self.filename = filename = op.abspath(op.join(basedir, filename))
self.line_number = 1

View File

@ -68,7 +68,7 @@ setup(
"Topic :: Utilities",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3"
] + [("Programming Language :: Python :: %s" % x) for x in "2.6 2.7 3.0 3.1 3.2 3.3 3.4".split()],
] + [("Programming Language :: Python :: %s" % x) for x in "2.7 3.0 3.1 3.2 3.3 3.4".split()],
cmdclass={"test": ToxTestCommand},
install_requires=[
"glob2",