Conversation
requirements.txt
Outdated
| ruamel.ordereddict==0.4.13 | ||
| ruamel.yaml==0.15.71 | ||
| argparse==1.4.0 No newline at end of file | ||
| argparse==1.4.0yamllint==1.15.0 No newline at end of file |
There was a problem hiding this comment.
Could you move yamllint to a new line?
tests/tests_semantics.py
Outdated
| from yamllint.config import YamlLintConfig | ||
| from yamllint import linter | ||
|
|
||
| class MyTest(unittest.TestCase): |
There was a problem hiding this comment.
@pumpkinman008 , Could you rename the class to TestSemantics
|
|
||
| self.assertEqual(input, input) No newline at end of file | ||
| def test_check_yaml_syntax(self): | ||
| augmented_yaml_file = check_yaml_syntax('./data/runtime.yaml') |
There was a problem hiding this comment.
@pumpkinman008 the function check_yaml_syntax takes a file object at input
There was a problem hiding this comment.
Also, the tests on the CI will be run from the root directory of the project. Can you change the path to ./tests/data/runtime.yaml.
Also, before the next PR, could you run
python -m unittest discover
from the root directory of the project and resolve any errors.
| self.assertEqual(input, input) No newline at end of file | ||
| def test_check_yaml_syntax(self): | ||
| augmented_yaml_file = check_yaml_syntax('./data/runtime.yaml') | ||
| file = open(augmented_yaml_file) |
There was a problem hiding this comment.
I get errors when running this line. The check_yaml_syntax function also returns a file object at output, try passing augmented_yaml_file.name to open().
Hey @maany I've added a YAML syntax validation rule. Please take a look. Thanks!