def test_yaml(self):
    try:
        import yaml
    except ImportError:
        raise unittest.SkipTest('Yaml lib not installed')
    self._testme_std(['resources/nginx.j2', 'resources/data.yml'])
    self._testme_std(['resources/nginx.j2', 'resources/data.yaml'])
    self._testme_std(['--format=yaml', 'resources/nginx.j2', 'resources/data.yml'])
    self._testme_std(['--format=yaml', 'resources/nginx.j2'], stdin=open('resources/data.yml'))
    self._testme_std(['--format=yaml', 'resources/nginx.j2', '-'], stdin=open('resources/data.yml'))
def test_yaml(self):
    try:
        import yaml
    except ImportError:
        raise unittest.SkipTest('Yaml lib not installed')
    self._testme_std(['resources/nginx.j2', 'resources/data.yml'])
    self._testme_std(['resources/nginx.j2', 'resources/data.yaml'])
    self._testme_std(['--format=yaml', 'resources/nginx.j2', 'resources/data.yml'])
    self._testme_std(['--format=yaml', 'resources/nginx.j2'], stdin=open('resources/data.yml'))
    self._testme_std(['--format=yaml', 'resources/nginx.j2', '-'], stdin=open('resources/data.yml'))