Fix bug when using comments in the "Examples:" section (#398)
* Fix bug when using comments in the "Examples:" section
This commit is contained in:
parent
02e667f239
commit
7cb344ef64
|
@ -1,6 +1,11 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
4.0.2
|
||||
-----
|
||||
- Fix a bug that prevents using comments in the ``Examples:`` section. (youtux)
|
||||
|
||||
|
||||
4.0.1
|
||||
-----
|
||||
- Fixed performance regression introduced in 4.0.0 where collection time of tests would take way longer than before. (youtux)
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
from pytest_bdd.steps import given, when, then
|
||||
from pytest_bdd.scenario import scenario, scenarios
|
||||
|
||||
__version__ = "4.0.1"
|
||||
__version__ = "4.0.2"
|
||||
|
||||
__all__ = [given.__name__, when.__name__, then.__name__, scenario.__name__, scenarios.__name__]
|
||||
|
|
|
@ -34,7 +34,7 @@ def split_line(line):
|
|||
|
||||
:return: List of strings.
|
||||
"""
|
||||
return [cell.replace("\\|", "|").strip() for cell in SPLIT_LINE_RE.split(line[1:-1])]
|
||||
return [cell.replace("\\|", "|").strip() for cell in SPLIT_LINE_RE.split(line)[1:-1]]
|
||||
|
||||
|
||||
def parse_line(line):
|
||||
|
|
|
@ -42,7 +42,7 @@ def test_outlined(testdir):
|
|||
|
||||
Examples:
|
||||
| start | eat | left |
|
||||
| 12 | 5 | 7 |
|
||||
| 12 | 5 | 7 | # a comment
|
||||
| 5 | 4 | 1 |
|
||||
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue