-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed null check and unittest outputter.
Fixed null check expecting literal 'NULL' instead of a null value. Fixed unittest outputter to not ignore tests in new format of demension followed by generic test case name. Added new test case to ensure all check configs load without erroring out. Signed-off-by: Varun Mittal <[email protected]>
- Loading branch information
1 parent
187d745
commit 41865fd
Showing
13 changed files
with
112 additions
and
84 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
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
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,29 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from focus_validator.config_objects import Rule | ||
from focus_validator.rules.spec_rules import SpecRules | ||
from focus_validator.validator import DEFAULT_VERSION_SETS_PATH | ||
|
||
|
||
def rules_version(): | ||
return sorted([x for x in os.walk(DEFAULT_VERSION_SETS_PATH)][0][1]) | ||
|
||
|
||
@pytest.mark.parametrize("focus_spec_version", rules_version()) | ||
def test_rules_load_with_no_errors(focus_spec_version): | ||
""" | ||
Test loading of rules with no errors | ||
""" | ||
spec_rules = SpecRules( | ||
override_filename=None, | ||
rule_set_path=DEFAULT_VERSION_SETS_PATH, | ||
rules_version=focus_spec_version, | ||
column_namespace=None, | ||
) | ||
spec_rules.load() | ||
|
||
for rule in spec_rules.rules: | ||
# ensures that the rule is a Rule object and not InvalidRule | ||
assert isinstance(rule, Rule) |