Esempio n. 1
0
 def test_parse_function(self):
     """Simple test to show function is handled by parser."""
     function_name = 'tests:dutch_is_guido'
     argv = ['massedit.py', '--function', function_name, 'tests.py']
     arguments = massedit.parse_command_line(argv)
     self.assertEqual(arguments.functions, [function_name])
Esempio n. 2
0
 def test_parse_expression(self):
     """Simple test to show expression is handled by parser."""
     expr_name = "re.subst('Dutch', 'Guido', line)"
     argv = ['massedit.py', '--expression', expr_name, 'tests.py']
     arguments = massedit.parse_command_line(argv)
     self.assertEqual(arguments.expressions, [expr_name])
Esempio n. 3
0
 def test_parse_expression(self):
     """Simple test to show expression is handled by parser."""
     expr_name = "re.subst('Dutch', 'Guido', line)"
     argv = ["massedit.py", "--expression", expr_name, "tests.py"]
     arguments = massedit.parse_command_line(argv)
     self.assertEqual(arguments.expressions, [expr_name])
Esempio n. 4
0
 def test_parse_function(self):
     """Simple test to show function is handled by parser."""
     function_name = "tests:dutch_is_guido"
     argv = ["massedit.py", "--function", function_name, "tests.py"]
     arguments = massedit.parse_command_line(argv)
     self.assertEqual(arguments.functions, [function_name])
Esempio n. 5
0
 def test_parse_function(self):
     """Simple test to show function is handled by parser."""
     function_name = "tests:dutch_is_guido"
     argv = ["massedit.py", "--function", function_name, "tests.py"]
     arguments = massedit.parse_command_line(argv)
     self.assertEqual(arguments.functions, [function_name])