# Path: insights/test_framework.py
# class FactoryManagerTestCase(unittest.TestCase):
#     '''
#     This abstract factory class targets the same achievements as the
#     FactoryAlgorithmTestCase, focusing on Intuition managers building block.
#     '''
# 
#     __metaclass__ = abc.ABCMeta
# 
#     def setUp(self):
#         setup_logger(self)
#         self.some_date = dt.datetime(2014, 04, 10)
#         self.buy_signal = {'goog': 34}
#         self.test_sids = ['goog', 'aapl', 'msft']
#         self.test_pf = generate_fake_portfolio(self.test_sids)
# 
#     def tearDown(self):
#         teardown_logger(self)
# 
#     @nottest
#     def _check_initialization(self, manager):
#         ok_(not manager.date)
#         ok_(not manager.portfolio)
#         ok_(not manager.perfs)
#         ok_(hasattr(manager, 'log'))
# 
#     @nottest
#     def _check_optimize_return(self, alloc, e_ret, e_risk):
#         ok_(isinstance(alloc, dict))
#         ok_(e_ret >= 0 and e_ret <= 1)
#         ok_(e_risk >= 0 and e_risk <= 1)
# 
# def generate_fake_returns(sids):
#     dates = pd.date_range('2012/01/01', '2012/06/01', tz=pytz.utc)
#     return pd.DataFrame(
#         {sid: [random.random() * 100 for _ in range(len(dates))]
#             for sid in sids},
#         index=dates
#     )


from nose.tools import eq_, raises, ok_
from insights.test_framework import (
    FactoryManagerTestCase, generate_fake_returns
)
import insights.managers.gmv as gmv
'''
Tests for insights.managers.gmv
'''



class ComputeWeighsTestCase(FactoryManagerTestCase):
    pass



# Path: insights/test_framework.py
# class FactoryManagerTestCase(unittest.TestCase):
#     '''
#     This abstract factory class targets the same achievements as the
#     FactoryAlgorithmTestCase, focusing on Intuition managers building block.
#     '''
# 
#     __metaclass__ = abc.ABCMeta
# 
#     def setUp(self):
#         setup_logger(self)
#         self.some_date = dt.datetime(2014, 04, 10)
#         self.buy_signal = {'goog': 34}
#         self.test_sids = ['goog', 'aapl', 'msft']
#         self.test_pf = generate_fake_portfolio(self.test_sids)
# 
#     def tearDown(self):
#         teardown_logger(self)
# 
#     @nottest
#     def _check_initialization(self, manager):
#         ok_(not manager.date)
#         ok_(not manager.portfolio)
#         ok_(not manager.perfs)
#         ok_(hasattr(manager, 'log'))
# 
#     @nottest
#     def _check_optimize_return(self, alloc, e_ret, e_risk):
#         ok_(isinstance(alloc, dict))
#         ok_(e_ret >= 0 and e_ret <= 1)
#         ok_(e_risk >= 0 and e_risk <= 1)
# 
# def generate_fake_returns(sids):
#     dates = pd.date_range('2012/01/01', '2012/06/01', tz=pytz.utc)
#     return pd.DataFrame(
#         {sid: [random.random() * 100 for _ in range(len(dates))]
#             for sid in sids},
#         index=dates
#     )


# Path: tests/managers/test_gmv.py
from nose.tools import eq_, raises, ok_
from insights.test_framework import (
    FactoryManagerTestCase, generate_fake_returns
)
import insights.managers.gmv as gmv

'''
Tests for insights.managers.gmv
'''



class ComputeWeighsTestCase(FactoryManagerTestCase):
    pass



class GmvManagerTestCase(FactoryManagerTestCase):