Example #1
0
 def test_shovel_help_specific_tasks(self):
     '''Gets the help message we'd expect from shovel_help for tasks'''
     actual = [line.strip() for line in
         help.shovel_help(self.shovel, 'two').split('\n')]
     expected = [
         'two.widget => long doc, long doc, long doc, long doc, long do...']
     self.assertEqual(actual, expected)
Example #2
0
 def test_help_missing_docstring(self):
     '''We should print '(No docstring)' for tasks missing a docstring'''
     shovel = Shovel.load(
         'test/examples/docstring/', 'test/examples/docstring/')
     actual = [line.strip() for line in help.shovel_help(shovel).split('\n')]
     expected = ['one/', 'one.foo => (No docstring)']
     self.assertEqual(actual, expected)
Example #3
0
 def test_help_missing_docstring(self):
     '''We should print '(No docstring)' for tasks missing a docstring'''
     shovel = Shovel.load(
         'test/examples/docstring/', 'test/examples/docstring/')
     actual = [line.strip() for line in help.shovel_help(shovel).split('\n')]
     expected = ['one/', 'one.foo => (No docstring)']
     self.assertEqual(actual, expected)
Example #4
0
 def test_shovel_help_specific_tasks(self):
     '''Gets the help message we'd expect from shovel_help for tasks'''
     actual = [line.strip() for line in
         help.shovel_help(self.shovel, 'two').split('\n')]
     expected = [
         'two.widget => long doc, long doc, long doc, long doc, long do...']
     self.assertEqual(actual, expected)
Example #5
0
 def test_shovel_help_basic(self):
     '''Gets the help message we'd expect from shovel_help for all tasks'''
     actual = [
         line.strip() for line in help.shovel_help(self.shovel).split('\n')
     ]
     expected = [
         'one/', 'one.widget => A dummy function', 'two/',
         'two.widget => long doc, long doc, long doc, long doc, long do...'
     ]
     self.assertEqual(actual, expected)
Example #6
0
 def test_shovel_help_basic(self):
     '''Gets the help message we'd expect from shovel_help for all tasks'''
     actual = [line.strip() for line in
         help.shovel_help(self.shovel).split('\n')]
     expected = [
         'one/',
         'one.widget => A dummy function',
         'two/',
         'two.widget => long doc, long doc, long doc, long doc, long do...']
     self.assertEqual(actual, expected)
Example #7
0
 def test_shovel_help_specific_task(self):
     '''Gets the help message we'd expect from shovel_help for a task'''
     actual = [line.strip() for line in
         help.shovel_help(self.shovel, 'two.widget').split('\n')]
     # We need to replace absolute paths in the test
     actual = [line.replace(os.getcwd(), '') for line in actual]
     expected = [
         '==================================================',
         'widget',
         '==============================',
         ('long doc, ' * 7).strip(),
         '==============================',
         'From /test/examples/help/two.py on line 6',
         '==============================',
         'widget()']
     self.assertEqual(actual, expected)
Example #8
0
 def test_shovel_help_specific_task(self):
     '''Gets the help message we'd expect from shovel_help for a task'''
     actual = [line.strip() for line in
         help.shovel_help(self.shovel, 'two.widget').split('\n')]
     # We need to replace absolute paths in the test
     actual = [line.replace(os.getcwd(), '') for line in actual]
     expected = [
         '==================================================',
         'widget',
         '==============================',
         ('long doc, ' * 7).strip(),
         '==============================',
         'From /test/examples/help/two.py on line 6',
         '==============================',
         'widget()']
     self.assertEqual(actual, expected)