Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow formatting tags on a single line
Add a --single-line-tags option, which causes consecutive tags to be output on a single line. Also add a --multi-line-tags option to explicitly specify the current default behaviour of outputting one tag per line. When the --single-line-tags option is specified, tags separated by comments are merged into one line, as discussed in issue #22.
- Loading branch information
1 parent
12f8bdf
commit de10398
Showing
9 changed files
with
170 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from typing import Tuple, Union | ||
|
||
from ._base import prepare | ||
from .examples import Examples | ||
from .feature import Feature | ||
from .location import LocationMixin | ||
from .scenario import Scenario | ||
from .scenario_outline import ScenarioOutline | ||
from .tag import Tag | ||
|
||
|
||
@prepare | ||
class TagGroup(LocationMixin): | ||
members: Tuple[Tag, ...] | ||
context: Union[Examples, Feature, Scenario, ScenarioOutline] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
@tag-1 @tag-2 | ||
Feature: Some meaningful feature | ||
Some meaningful feature description | ||
|
||
Background: A solid background | ||
Some description for this background | ||
This description has multiple lines | ||
|
||
Given A lot of money | ||
| EUR | | ||
| USD | | ||
| VND | | ||
|
||
@tag-no-1 @decorate-1 @fixture-1 | ||
Scenario: Gain a lot of money | ||
This is a description for this scenario | ||
|
||
Given I go to the bank | ||
Then I rob the bank | ||
|
||
# Some comment here... | ||
@tag-no-2 @decorate-2 @prepare-2 @fixture-2 | ||
# Another comment... | ||
Scenario Outline: Break the bank's vault | ||
A description for this scenario outline | ||
|
||
# Is it helpful to put a comment here? | ||
Given I stand in front of the bank's vault | ||
And I break the vault's door | ||
""" | ||
Some docstring here | ||
A docstring can have multiple lines | ||
With indentation | ||
""" | ||
Then I enter the vault | ||
""" | ||
Some docstring there | ||
""" | ||
And I see a lot of money | ||
|
||
# Examples can have tags? Hmmm... | ||
@test-examples-tags | ||
Examples: Continents | ||
This is the description for these examples | ||
|
||
| Asia | 111 | | ||
| Europe | 22 | | ||
# We can even have a comment in the middle of a table | ||
| America | 3 | | ||
# Pipe characters in table cells need to be escaped | ||
| a \| b | 4 | | ||
|
||
# Some random comment at the end of the document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters