def __init__(self): """Initialize LISC Words() object.""" # Inherit from Base Class Base.__init__(self) # Initialize a list to store results for all the erps self.result_keys = list() self.results = list()
def __init__(self): """Initialize LISC Words() object.""" # Inherit from Base Class Base.__init__(self) # Initialize a list to store results for all the erps self.result_keys = list() self.results = list() # Initialize dictionary to store db info self.meta_dat = dict()
def __init__(self): """Initialize LISC Count() object.""" # Initialize dictionary to store search terms self.terms = dict() for dat in ['A', 'B']: self.terms[dat] = Base() self.terms[dat].counts = np.zeros(0, dtype=int) # Initialize data output variables self.dat_numbers = np.zeros(0) self.dat_percent = np.zeros(0) self.square = bool()
def load_base(set_erps=False, set_excl=False, set_terms=None): """Helper function to load Base() object for testing.""" base = Base() if set_erps: base.set_erps_file() if set_excl: base.set_exclusions_file() if set_terms: base.set_terms_file(set_terms) return base
def test_set_exclusions(): """Test the set_exclusions method of Base.""" base = Base() base.set_erps(['N100', 'P100']) base.set_exclusions(['not', 'this']) assert base.exclusions # Check error with improper # of exclusion words base = Base() base.set_erps(['N100', 'P100']) with raises(InconsistentDataError): base.set_exclusions(['bad'])
def test_base(): """Test the Base() object returns properly.""" assert Base()
def test_base(): assert Base()