def check_result(self, cmdline, result): test_result = ddar.parse_args(cmdline.split(), **ddar.ddar_arg_spec) # Remove anything that is not set (None) for brevity in individual # tests. We check the None behaviour in test_none. test_result = dict( ((k, v) for k, v in test_result.iteritems() if v is not None)) if test_result['member'] == []: del test_result['member'] self.assertEquals(test_result, result)
def check_result(self, cmdline, result): test_result = ddar.parse_args(cmdline.split()) # Remove anything that is not set (None) for brevity in individual # tests. We check the None behaviour in test_none. test_result = dict(((k,v) for k,v in test_result.iteritems() if v is not None)) if test_result['member'] == []: del test_result['member'] self.assertEquals(test_result, result)
def test_none(self): result = ddar.parse_args([], **ddar.ddar_arg_spec) self.assert_(all((result[v] is None for v in 'ctxdf'))) self.assertEqual(result['member'], [])
def test_none(self): result = ddar.parse_args([]) self.assert_(all((result[v] is None for v in 'ctxdf'))) self.assertEqual(result['member'], [])