Changeset 44:5a8c28575271 in orange-reliability for docs/rst/conf.py


Ignore:
Timestamp:
10/03/13 18:09:26 (7 months ago)
Author:
markotoplak
Branch:
default
Message:

removed mock dependency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/rst/conf.py

    r42 r44  
    1010 
    1111import sys, os 
    12 import mock 
     12 
     13class Mock(object): 
     14    def __init__(self, *args, **kwargs): 
     15        pass 
     16 
     17    def __call__(self, *args, **kwargs): 
     18        return Mock() 
     19 
     20    @classmethod 
     21    def __getattr__(cls, name): 
     22        if name in ('__file__', '__path__'): 
     23            return '/dev/null' 
     24        elif name[0] == name[0].upper(): 
     25            mockType = type(name, (), {}) 
     26            mockType.__module__ = __name__ 
     27            return mockType 
     28        else: 
     29            return Mock() 
    1330 
    1431MOCK_MODULES = ["numpy", "numpy.core", "numpy.core.ma", "scipy", "scipy.stats", "ma", "linalg"] 
    1532for mod_name in MOCK_MODULES: 
    16     sys.modules[mod_name] = mock.Mock() 
     33    sys.modules[mod_name] = Mock() 
    1734 
    1835import imp 
Note: See TracChangeset for help on using the changeset viewer.