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])
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])
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])
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])