Example #1
0
 def test_convert_task_bits_deals_with_both_pos_args_and_kw_args(self):
     func, pos_args, kwargs = tasks.convert_task_bits('func:arg,kw=arg')
     self.assertEqual('func', func)
     self.assertSequenceEqual(('arg',), pos_args)
     self.assertDictEqual({'kw': 'arg'}, kwargs)
Example #2
0
 def test_convert_task_bits_deals_with_function_and_multiple_pos_args(self):
     func, pos_args, kwargs = tasks.convert_task_bits('func:arg1,arg2')
     self.assertEqual('func', func)
     self.assertSequenceEqual(('arg1', 'arg2'), pos_args)
     self.assertDictEqual({}, kwargs)
Example #3
0
 def test_convert_task_bits_deals_with_function_and_multiple_kw_args(self):
     func, pos_args, kwargs = tasks.convert_task_bits('func:kw1=arg1,kw2=arg2')
     self.assertEqual('func', func)
     self.assertSequenceEqual((), pos_args)
     self.assertDictEqual({'kw1': 'arg1', 'kw2': 'arg2'}, kwargs)
Example #4
0
 def test_convert_task_bits_deals_with_lone_function(self):
     func, pos_args, kwargs = tasks.convert_task_bits('func')
     self.assertEqual('func', func)
     self.assertSequenceEqual((), pos_args)
     self.assertDictEqual({}, kwargs)
Example #5
0
 def test_convert_task_bits_deals_with_both_pos_args_and_kw_args(self):
     func, pos_args, kwargs = tasks.convert_task_bits('func:arg,kw=arg')
     self.assertEqual('func', func)
     self.assertSequenceEqual(('arg', ), pos_args)
     self.assertDictEqual({'kw': 'arg'}, kwargs)
Example #6
0
 def test_convert_task_bits_deals_with_function_and_multiple_kw_args(self):
     func, pos_args, kwargs = tasks.convert_task_bits(
         'func:kw1=arg1,kw2=arg2')
     self.assertEqual('func', func)
     self.assertSequenceEqual((), pos_args)
     self.assertDictEqual({'kw1': 'arg1', 'kw2': 'arg2'}, kwargs)
Example #7
0
 def test_convert_task_bits_deals_with_function_and_multiple_pos_args(self):
     func, pos_args, kwargs = tasks.convert_task_bits('func:arg1,arg2')
     self.assertEqual('func', func)
     self.assertSequenceEqual(('arg1', 'arg2'), pos_args)
     self.assertDictEqual({}, kwargs)
Example #8
0
 def test_convert_task_bits_deals_with_lone_function(self):
     func, pos_args, kwargs = tasks.convert_task_bits('func')
     self.assertEqual('func', func)
     self.assertSequenceEqual((), pos_args)
     self.assertDictEqual({}, kwargs)