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