def test_command_optdefaults_contains_default_when_absent():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value'})
    assert c.contains_defaults('bogus') == False
def test_command_optdefaults_contains_default_multi_tests_present():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value', 'another': 'more'})
    assert c.contains_defaults('test', 'another')
def test_command_optdefaults_contains_default_multi_tests_absent_difforder():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value', 'another': 'more'})
    assert c.contains_defaults('bogus', 'test') == False
def test_command_optdefaults_contains_default_when_empty():
    set_sysargv(test_command_1)
    c = Command()
    assert c.contains_defaults('test') == False
def test_command_optdefaults_contains_default_when_present():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value'})
    assert c.contains_defaults('test') == True
Ejemplo n.º 6
0
def test_command_optdefaults_contains_default_when_absent():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value'})
    assert c.contains_defaults('bogus') == False
Ejemplo n.º 7
0
def test_command_optdefaults_contains_default_multi_tests_absent_difforder():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value', 'another': 'more'})
    assert c.contains_defaults('bogus', 'test') == False
Ejemplo n.º 8
0
def test_command_optdefaults_contains_default_multi_tests_present():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value', 'another': 'more'})
    assert c.contains_defaults('test', 'another')
Ejemplo n.º 9
0
def test_command_optdefaults_contains_default_when_present():
    set_sysargv(test_command_1)
    c = Command()
    c.set_defaults({'test': 'value'})
    assert c.contains_defaults('test') == True
Ejemplo n.º 10
0
def test_command_optdefaults_contains_default_when_empty():
    set_sysargv(test_command_1)
    c = Command()
    assert c.contains_defaults('test') == False