tests package

Submodules

tests.test_core module

This script executes testing of core INDIGOpy functions.

class tests.test_core.TestClassify[source]

Bases: object

classes = ('S', 'N', 'A')
scores = [-2, 1.5, 0.5, -0.1, 1]
test_classify_classes()[source]

Make sure that classify works with the classes parameter.

test_classify_default()[source]

Make sure that classify works with required inputs only.

test_classify_thresholds()[source]

Make sure that classify works with the thresholds parameter.

thresholds = (-1, 1)
class tests.test_core.TestFeaturize[source]

Bases: object

binarize = False
entropy = True
feature_names = ['G1', 'G2', 'G3']
interactions = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B', 'C']]
key = [('A', 'Drug_A'), ('B', 'Drug_B'), ('C', 'Drug_C')]
na_handle = 0
norm_method = 'minmax'
normalize = True
orthology_map = {'IAI1': ['G1'], 'MC1400': ['G1', 'G3'], 'MG1655': ['G1', 'G2']}
profiles = {'A': [1, nan, 1], 'B': [-2, 1.5, -0.5], 'C': [1, 2, 3]}
profiles_alt = {'Drug_A': [1, nan, 1], 'Drug_B': [-2, 1.5, -0.5], 'Drug_C': [1, 2, 3]}
remove_zero_rows = True
silent = False
strains = ['MG1655', 'MG1655', 'MC1400', 'IAI1']
test_featurize_binarize()[source]

Make sure that featurize works with the binarize parameter.

test_featurize_default()[source]

Make sure that featurize works with required inputs only.

test_featurize_entropy()[source]

Make sure that featurize works with the entropy parameter.

test_featurize_feature_names()[source]

Make sure that featurize works with the feature_names parameter.

test_featurize_key_and_silent()[source]

Make sure that featurize works with the key parameter provided mismatching interactions and profiles. Also check that a warning is raised.

test_featurize_na_handle()[source]

Make sure that featurize works with the na_handle parameter.

test_featurize_normalize_and_norm_method()[source]

Make sure that featurize works with normalize and norm_method parameters.

test_featurize_remove_zero_rows()[source]

Make sure that featurize works with the remove_zero_rows parameter.

test_featurize_strains_and_orthology_map()[source]

Make sure that featurize works with strains and orthology_map parameters.

test_featurize_thresholds()[source]

Make sure that featurize works with the thresholds parameter.

test_featurize_time_and_time_values()[source]

Make sure that featurize works with time and time_values parameters.

thresholds = (-1, 1)
time = True
time_values = [[0, 0], [1, 1], [1, 2], [1, 2, 3]]
class tests.test_core.TestLoadSample[source]

Bases: object

input1 = 'ecoli'
input2 = 'mtb'
input3 = 'saureus'
input4 = 'abaumannii'
test_load_sample_abaumannii()[source]

Make sure that load_sample works for A. baumannii data.

test_load_sample_ecoli()[source]

Make sure that load_sample works for E. coli data.

test_load_sample_mtb()[source]

Make sure that load_sample works for M. tuberculosis data.

test_load_sample_saureus()[source]

Make sure that load_sample works for S. aureus data.

Module contents