-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from qtc-de/develop
Prepare v1.6.0 Release
- Loading branch information
Showing
25 changed files
with
1,558 additions
and
70 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
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,51 @@ | ||
#!/usr/bin/python3 | ||
|
||
import tricot | ||
import pytest | ||
|
||
|
||
config_list = [['this,is,a,simple,group,def']] | ||
config_list.append(['now,lets,try,{conditional,orlike},group,def']) | ||
config_list.append(['{this,it},works,also,{with,using},more,than,one']) | ||
config_list.append(['multiple,lists', 'can,also,be,defined']) | ||
config_list.append(['{this,it},works', 'also,{with,using},orlike']) | ||
config_list.append(['lets,add,*,some,wildcards']) | ||
config_list.append(['lets,add,**,some,wildcards']) | ||
config_list.append(['lets,*,**,some,wildcards']) | ||
config_list.append(['**,some,wildcards']) | ||
|
||
match_list = [[([['this', 'is', 'a', 'simple', 'group', 'def']], True), ([['nope']], False)]] | ||
match_list.append([([['now', 'lets', 'try', 'conditional', 'group', 'def']], True), | ||
([['now', 'lets', 'try', 'orlike', 'group', 'def']], True), | ||
([['now', 'lets', 'tri', 'orlike', 'group', 'def']], False)]) | ||
match_list.append([([['this', 'works', 'also', 'with', 'more', 'than', 'one']], True), | ||
([['this', 'works', 'also', 'using', 'more', 'than', 'one']], True), | ||
([['it', 'works', 'also', 'with', 'more', 'than', 'one']], True), | ||
([['it', 'works', 'also', 'using', 'more', 'than', 'one']], True), | ||
([['ot', 'works', 'also', 'using', 'more', 'than', 'one']], False)]) | ||
match_list.append([([['aaaa', 'bbbb', 'cccc'], ['dddd', 'eeee']], False), | ||
([['aaaa', 'bbbb', 'cccc'], ['multiple', 'lists']], True), | ||
([['can', 'also', 'be', 'defined'], ['aaaa', 'bbbb']], True)]) | ||
match_list.append([([['aaaa', 'bbbb', 'cccc'], ['dddd', 'eeee']], False), | ||
([['this', 'works'], ['multiple', 'lists']], True), | ||
([['also', 'using', 'orlike'], ['aaaa', 'bbbb']], True)]) | ||
match_list.append([([['lets', 'add', 'hi :)', 'some', 'wildcards'], ['dddd', 'eeee']], True), | ||
([['lets', 'hi :)', 'some', 'wildcards'], ['dddd', 'eeee']], False)]) | ||
match_list.append([([['lets', 'add', 'hi :)', 'hi :D', 'some', 'wildcards'], ['dddd', 'eeee']], True), | ||
([['lets', 'hi :)', 'some', 'wildcards'], ['dddd', 'eeee']], False)]) | ||
match_list.append([([['lets', 'add', 'hi :)', 'hi :D', 'some', 'wildcards'], ['dddd', 'eeee']], True), | ||
([['lets', 'hi :)', 'some', 'wildcards'], ['dddd', 'eeee']], True)]) | ||
match_list.append([([['lets', 'add', 'hi :)', 'hi :D', 'some', 'wildcards'], ['dddd', 'eeee']], True), | ||
([['lets', 'hi :)', 'some', 'wildcards'], ['dddd', 'eeee']], True), | ||
([['aaaaa', 'hi :)', 'some', 'wildcards'], ['dddd', 'eeee']], True)]) | ||
|
||
|
||
@pytest.mark.parametrize('config, match', zip(config_list, match_list)) | ||
def test_group_matching(config, match): | ||
''' | ||
Check whether group matches are matching as expected | ||
''' | ||
for tupl in match: | ||
|
||
groups = tricot.utils.parse_groups(config) | ||
assert tricot.utils.groups_contain(groups, tupl[0]) == tupl[1] |
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,35 @@ | ||
#!/usr/bin/python3 | ||
|
||
import tricot | ||
import pytest | ||
|
||
|
||
config_list = [['this,is,a,simple,group,def']] | ||
config_list.append(['now,lets,try,{conditional,orlike},group,def']) | ||
config_list.append(['{this,it},works,also,{with,using},more,than,one']) | ||
config_list.append(['multiple,lists', 'can,also,be,defined']) | ||
config_list.append(['{this,it},works', 'also,{with,using},orlike']) | ||
|
||
result_list = [[['this', 'is', 'a', 'simple', 'group', 'def']]] | ||
result_list.append([['now', 'lets', 'try', 'conditional', 'group', 'def'], | ||
['now', 'lets', 'try', 'orlike', 'group', 'def']]) | ||
result_list.append([['this', 'works', 'also', 'with', 'more', 'than', 'one'], | ||
['this', 'works', 'also', 'using', 'more', 'than', 'one'], | ||
['it', 'works', 'also', 'with', 'more', 'than', 'one'], | ||
['it', 'works', 'also', 'using', 'more', 'than', 'one']]) | ||
result_list.append([['multiple', 'lists'], ['can', 'also', 'be', 'defined']]) | ||
result_list.append([['this', 'works'], ['also', 'with', 'orlike'], | ||
['this', 'works'], ['also', 'using', 'orlike'], | ||
['it', 'works'], ['also', 'with', 'orlike'], | ||
['it', 'works'], ['also', 'using', 'orlike']]) | ||
|
||
|
||
@pytest.mark.parametrize('config, results', zip(config_list, result_list)) | ||
def test_group_parsing(config, results): | ||
''' | ||
Check whether group specifications are parsed correctly. | ||
''' | ||
groups = tricot.utils.parse_groups(config) | ||
|
||
for group in groups: | ||
assert group in results |
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,9 @@ | ||
tester: | ||
name: groups | ||
title: Group Tests | ||
description: |- | ||
"Performs different checks on tricot's test group feature" | ||
testers: | ||
- Groups/nested_one.yml | ||
- Groups/nested_two.yml |
Oops, something went wrong.