Commit e78e0b36 authored by Jay's avatar Jay Committed by jay
Browse files

More agile conditional import for testing.

parent 89917747
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3,11 +3,18 @@ import unittest
from .. import io_yaml
from .. import io_json

try:
    import yaml
    missing = False
except ImportError:
    missing = True

from autocnet.examples import get_path


class TestYAML(unittest.TestCase):

    @unittest.skipif(missing == True)
    def test_read(self):
        d = io_yaml.read_yaml(get_path('logging.yaml'))
        self.assertIn('handlers', d.keys())