Loading autocnet/examples/logging.json→autocnet/examples/loggers/logging.json +0 −0 File moved. View file autocnet/examples/logging.yaml→autocnet/examples/loggers/logging.yaml +0 −0 File moved. View file autocnet/fileio/io_yaml.py +2 −2 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ try: except: print('YAML package not installed, disabling yaml_io module') def read_yaml(inputfile): """ Read the input yaml file into a python dictionary Loading @@ -20,7 +21,6 @@ def read_yaml(inputfile): try: with open(inputfile, 'r') as f: ydict = yaml.load(f) except: except: # pragma: no cover raise IOError('Unable to load YAML file.') return ydict autocnet/fileio/tests/test_io_json.pydeleted 100644 → 0 +0 −0 Empty file deleted. autocnet/fileio/tests/test_structured_io.py 0 → 100644 +20 −0 Original line number Diff line number Diff line import unittest from .. import io_yaml from .. import io_json from autocnet.examples import get_path class TestYAML(unittest.TestCase): def test_read(self): d = io_yaml.read_yaml(get_path('logging.yaml')) self.assertIn('handlers', d.keys()) class TestJSON(unittest.TestCase): def test_read(self): d = io_json.read_json(get_path('logging.json')) self.assertIn('handlers', d.keys()) Loading
autocnet/fileio/io_yaml.py +2 −2 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ try: except: print('YAML package not installed, disabling yaml_io module') def read_yaml(inputfile): """ Read the input yaml file into a python dictionary Loading @@ -20,7 +21,6 @@ def read_yaml(inputfile): try: with open(inputfile, 'r') as f: ydict = yaml.load(f) except: except: # pragma: no cover raise IOError('Unable to load YAML file.') return ydict
autocnet/fileio/tests/test_structured_io.py 0 → 100644 +20 −0 Original line number Diff line number Diff line import unittest from .. import io_yaml from .. import io_json from autocnet.examples import get_path class TestYAML(unittest.TestCase): def test_read(self): d = io_yaml.read_yaml(get_path('logging.yaml')) self.assertIn('handlers', d.keys()) class TestJSON(unittest.TestCase): def test_read(self): d = io_json.read_json(get_path('logging.json')) self.assertIn('handlers', d.keys())