Ignore:
Timestamp:
02/07/12 12:17:35 (2 years ago)
Author:
ales_erjavec
Branch:
default
Message:

Added some docstrings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/testing/unit/tests/test_refactoring.py

    r9862 r9910  
    33 
    44""" 
    5 import sys, os 
    65import unittest 
    76 
     
    2625     
    2726def rhasattr(obj, name): 
     27    """ Recursive hasattr. 
     28    """ 
    2829    while "." in name: 
    2930        first, name = name.split(".", 1) 
     
    3536 
    3637def rgetattr(obj, name): 
     38    """ Recursive getattr  
     39    """ 
    3740    while "." in name: 
    3841        first, name = name.split(".", 1) 
     
    4548 
    4649def import_package(name): 
     50    """ Import a package and return it. 
     51    """ 
    4752    mod = __import__(name) 
    4853    if "." in name: 
     
    6671             
    6772             
    68             self.assertTrue(rhasattr(old_mod, old_name), "{0} is missing".format(old)) 
    69             self.assertTrue(rhasattr(new_mod, new_name), "{0} is missing".format(new)) 
     73            self.assertTrue(rhasattr(old_mod, old_name),  
     74                            "{0} is missing".format(old)) 
     75            self.assertTrue(rhasattr(new_mod, new_name), 
     76                            "{0} is missing".format(new)) 
    7077             
    7178    def test_import_mapping(self): 
     
    7683     
    7784             
    78              
    7985if __name__ == "__main__": 
    8086    unittest.main() 
Note: See TracChangeset for help on using the changeset viewer.