summaryrefslogtreecommitdiffstats
path: root/tests/yamlparser
diff options
context:
space:
mode:
authorThanh Ha <zxiiro@gmail.com>2019-08-23 09:14:39 -0400
committerSorin Sbarnea <ssbarnea@redhat.com>2019-09-09 19:23:24 +0100
commit4d90c187a945c04b9949d5ee7738a049dd634897 (patch)
tree106bf6e05ad1f2260823e7cd68651b535b8ac3ef /tests/yamlparser
parentead185134d8aa5d3d0974207356de6c4fdb2e6e8 (diff)
downloadpython-jenkins-job-builder-4d90c187a945c04b9949d5ee7738a049dd634897.tar.gz
python-jenkins-job-builder-4d90c187a945c04b9949d5ee7738a049dd634897.tar.xz
python-jenkins-job-builder-4d90c187a945c04b9949d5ee7738a049dd634897.zip
Auto-generated output from python-black
Please review the following patch containing the code changes in the repo. This patch is a transition patch and is the auto-generated output of the python-black tool. Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032 Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Diffstat (limited to 'tests/yamlparser')
-rw-r--r--tests/yamlparser/test_yamlparser.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/yamlparser/test_yamlparser.py b/tests/yamlparser/test_yamlparser.py
index cfc0c690..32030835 100644
--- a/tests/yamlparser/test_yamlparser.py
+++ b/tests/yamlparser/test_yamlparser.py
@@ -24,20 +24,19 @@ from tests import base
class TestCaseModuleYamlInclude(base.SingleJobTestCase):
- fixtures_path = os.path.join(os.path.dirname(__file__), 'fixtures')
+ fixtures_path = os.path.join(os.path.dirname(__file__), "fixtures")
scenarios = base.get_scenarios(fixtures_path)
class TestYamlParserExceptions(base.BaseTestCase):
- fixtures_path = os.path.join(os.path.dirname(__file__), 'exceptions')
+ fixtures_path = os.path.join(os.path.dirname(__file__), "exceptions")
def test_incorrect_template_dimensions(self):
self.conf_filename = None
config = self._get_config()
yp = parser.YamlParser(config)
- yp.parse(os.path.join(self.fixtures_path,
- "incorrect_template_dimensions.yaml"))
+ yp.parse(os.path.join(self.fixtures_path, "incorrect_template_dimensions.yaml"))
reg = registry.ModuleRegistry(config)
@@ -47,23 +46,22 @@ class TestYamlParserExceptions(base.BaseTestCase):
class TestYamlParserFailureFormattingExceptions(base.BaseScenariosTestCase):
- fixtures_path = os.path.join(os.path.dirname(__file__), 'exceptions')
- scenarios = [
- ('s1', {'name': 'template'}),
- ('s2', {'name': 'params'})
- ]
+ fixtures_path = os.path.join(os.path.dirname(__file__), "exceptions")
+ scenarios = [("s1", {"name": "template"}), ("s2", {"name": "params"})]
def test_yaml_snippet(self):
self.conf_filename = None
config = self._get_config()
yp = parser.YamlParser(config)
- yp.parse(os.path.join(self.fixtures_path,
- "failure_formatting_{}.yaml".format(self.name)))
+ yp.parse(
+ os.path.join(
+ self.fixtures_path, "failure_formatting_{}.yaml".format(self.name)
+ )
+ )
reg = registry.ModuleRegistry(config)
self.assertRaises(Exception, yp.expandYaml, reg)
- self.assertIn("Failure formatting {}".format(self.name),
- self.logger.output)
+ self.assertIn("Failure formatting {}".format(self.name), self.logger.output)
self.assertIn("Problem formatting with args", self.logger.output)