How to use the f90nml.cli.has_yaml function in f90nml

To help you get started, we’ve selected a few f90nml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marshallward / f90nml / tests / test_f90nml.py View on Github external
def test_cli_missing_yaml(self):
        orig_has_yaml = f90nml.cli.has_yaml
        f90nml.cli.has_yaml = False

        cmd = ['f90nml', 'types.yaml']
        source_str = self.get_cli_output(cmd, get_stderr=True)

        target_str = ('f90nml: error: YAML module could not be found.\n'
            '  To enable YAML support, install PyYAML or use the f90nml[yaml] '
            'package.\n')
        self.assertEqual(source_str, target_str)

        f90nml.cli.has_yaml = orig_has_yaml
github marshallward / f90nml / tests / test_f90nml.py View on Github external
def test_cli_missing_yaml(self):
        orig_has_yaml = f90nml.cli.has_yaml
        f90nml.cli.has_yaml = False

        cmd = ['f90nml', 'types.yaml']
        source_str = self.get_cli_output(cmd, get_stderr=True)

        target_str = ('f90nml: error: YAML module could not be found.\n'
            '  To enable YAML support, install PyYAML or use the f90nml[yaml] '
            'package.\n')
        self.assertEqual(source_str, target_str)

        f90nml.cli.has_yaml = orig_has_yaml
github marshallward / f90nml / tests / test_f90nml.py View on Github external
def test_cli_missing_yaml(self):
        orig_has_yaml = f90nml.cli.has_yaml
        f90nml.cli.has_yaml = False

        cmd = ['f90nml', 'types.yaml']
        source_str = self.get_cli_output(cmd, get_stderr=True)

        target_str = ('f90nml: error: YAML module could not be found.\n'
            '  To enable YAML support, install PyYAML or use the f90nml[yaml] '
            'package.\n')
        self.assertEqual(source_str, target_str)

        f90nml.cli.has_yaml = orig_has_yaml