Beispiel #1
0
def test__sanitize_config():
    # fails if missing 'checks'
    nt.assert_raises(ConfigError, CheckRunner._sanitize_config, {})

    # creates minimal config
    new_config = CheckRunner._sanitize_config({'checks': {}})
    nt.eq_(new_config, {'checks':
                        {'structural_checks': [],
                         'neuron_checks': [],
                         },
                        'options': {},
                        'color': False,
                        })

    # makes no changes to already filled out config
    new_config = CheckRunner._sanitize_config(CONFIG)
    nt.eq_(CONFIG, new_config)
Beispiel #2
0
def test__sanitize_config():
    # fails if missing 'checks'
    with pytest.raises(ConfigError):
        CheckRunner._sanitize_config({})

    # creates minimal config
    new_config = CheckRunner._sanitize_config({'checks': {}})
    assert new_config == {
        'checks': {
            'neuron_checks': [],
        },
        'options': {},
        'color': False,
    }

    # makes no changes to already filled out config
    new_config = CheckRunner._sanitize_config(CONFIG)
    assert CONFIG == new_config
Beispiel #3
0
def test__sanitize_config():
    # fails if missing 'checks'
    nt.assert_raises(ConfigError, CheckRunner._sanitize_config, {})

    # creates minimal config
    new_config = CheckRunner._sanitize_config({'checks': {}})
    nt.eq_(
        new_config, {
            'checks': {
                'structural_checks': [],
                'neuron_checks': [],
            },
            'options': {},
            'color': False,
        })

    # makes no changes to already filled out config
    new_config = CheckRunner._sanitize_config(CONFIG)
    nt.eq_(CONFIG, new_config)