コード例 #1
0
ファイル: tests.py プロジェクト: myint/massedit
 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])
コード例 #2
0
ファイル: tests.py プロジェクト: myint/massedit
 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])
コード例 #3
0
ファイル: tests.py プロジェクト: aliabbasjp/massedit
 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])
コード例 #4
0
ファイル: tests.py プロジェクト: aliabbasjp/massedit
 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])
コード例 #5
0
ファイル: tests.py プロジェクト: elmotec/massedit
 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])