# Path: doodad/utils/safe_import.py
# class FailedImportModule(object):
#     def __init__(self, name):
#     def __getattr__(self, key):
#     def __setattr__(self, key, value):
# def try_import(name):


import unittest
import sys
from doodad.utils import safe_import



class TestSafeImport(unittest.TestCase):
    def test_good_import(self):
        lib = safe_import.try_import('sys')
        self.assertEqual(sys.copyright, lib.copyright)

    def test_bad_import(self):

# Path: doodad/utils/safe_import.py
# class FailedImportModule(object):
#     def __init__(self, name):
#     def __getattr__(self, key):
#     def __setattr__(self, key, value):
# def try_import(name):


# Path: doodad/utils/test_safe_import.py
import unittest
import sys
from doodad.utils import safe_import




class TestSafeImport(unittest.TestCase):
    def test_good_import(self):
        lib = safe_import.try_import('sys')
        self.assertEqual(sys.copyright, lib.copyright)

    def test_bad_import(self):

        lib = safe_import.try_import('bad_library')