Mocking photutils and astropy, trying to fix autodoc/readthedocs
#
import os
import sys
-# from unittest.mock import MagicMock
-#
-# class Mock(MagicMock):
-# @classmethod
-# def __getattr__(cls, name):
-# return MagicMock()
-#
-# MOCK_MODULES = ['photutils', 'astropy']
-# sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
+from unittest.mock import MagicMock
+
+class Mock(MagicMock):
+ @classmethod
+ def __getattr__(cls, name):
+ return MagicMock()
+
+MOCK_MODULES = ['photutils', 'astropy']
+sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
sys.path.insert(0, os.path.abspath('../../vip_hci/'))
