def test_sanitize_config(): nt.assert_raises(ConfigError, ms.sanitize_config, {'neurite': []}) new_config = ms.sanitize_config({}) #empty nt.eq_(2, len(new_config)) #neurite & neuron created full_config = { 'neurite': { 'section_lengths': ['max', 'total'], 'section_volumes': ['total'], 'section_branch_orders': ['max'] }, 'neurite_type': ['AXON', 'APICAL_DENDRITE', 'BASAL_DENDRITE', 'ALL'], 'neuron': { 'soma_radii': ['mean'] } } new_config = ms.sanitize_config(full_config) nt.eq_(3, len(new_config)) #neurite, neurite_type & neuron
def test_sanitize_config(): with pytest.raises(ConfigError): ms.sanitize_config({'neurite': []}) new_config = ms.sanitize_config({}) # empty assert 2 == len(new_config) # neurite & neuron created full_config = { 'neurite': { 'section_lengths': ['max', 'total'], 'section_volumes': ['total'], 'section_branch_orders': ['max'] }, 'neurite_type': ['AXON', 'APICAL_DENDRITE', 'BASAL_DENDRITE', 'ALL'], 'neuron': { 'soma_radii': ['mean'] } } new_config = ms.sanitize_config(full_config) assert 3 == len(new_config) # neurite, neurite_type & neuron