Beispiel #1
0
 def test_edit_pre_bash_comment(self):
     """Test that bash comments starting with '#' are NOT deleted"""
     result = edit_pre_post(pre='OldPre\n# Dont delete me',
                            post='OldPost # Dont delete me')
     self.assertEqual(result[0],
                      'Test\nOldPreTest\n# Dont delete meTest\nTest')
     self.assertEqual(result[1], 'Test\nOldPost # Dont delete meTest\nTest')
 def test_pre_post(self):
     result = edit_pre_post(summary={
         'Param 1': 'Value 1',
         'Param 2': 'Value 1'
     })
     self.assertEqual(result[0], 'Test\nTest\nTest')
     self.assertEqual(result[1], 'Test\nTest\nTest')
Beispiel #3
0
 def test_edit_pre_post_comment(self):
     """Test that lines starting with '#=' are ignored and are not ignored
     if they start with any other character"""
     result = edit_pre_post(pre='OldPre\n#=Delete me',
                            post='OldPost #=Dont delete me')
     self.assertEqual(result[0], 'Test\nOldPreTest\nTest')
     self.assertEqual(result[1], 'Test\nOldPost #=Dont delete meTest\nTest')
Beispiel #4
0
def test_pre_post(non_interactive_editor):
    result = edit_pre_post(summary={
        'Param 1': 'Value 1',
        'Param 2': 'Value 1'
    })
    assert result[0] == 'Test\nTest\nTest'
    assert result[1] == 'Test\nTest\nTest'
 def test_edit_pre_post(self):
     result = edit_pre_post(pre='OldPre', post='OldPost')
     self.assertEqual(result[0], 'Test\nOldPreTest\nTest')
     self.assertEqual(result[1], 'Test\nOldPostTest\nTest')
Beispiel #6
0
def test_edit_pre_bash_comment(non_interactive_editor):
    """Test that bash comments starting with '#' are NOT deleted."""
    result = edit_pre_post(pre='OldPre\n# Dont delete me',
                           post='OldPost # Dont delete me')
    assert result[0] == 'Test\nOldPreTest\n# Dont delete meTest\nTest'
    assert result[1] == 'Test\nOldPost # Dont delete meTest\nTest'
Beispiel #7
0
def test_edit_pre_post_comment(non_interactive_editor):
    """Test that lines starting with '#=' are ignored and are not ignored if they start with any other character."""
    result = edit_pre_post(pre='OldPre\n#=Delete me',
                           post='OldPost #=Dont delete me')
    assert result[0] == 'Test\nOldPreTest\nTest'
    assert result[1] == 'Test\nOldPost #=Dont delete meTest\nTest'
Beispiel #8
0
def test_edit_pre_post(non_interactive_editor):
    result = edit_pre_post(pre='OldPre', post='OldPost')
    assert result[0] == 'Test\nOldPreTest\nTest'
    assert result[1] == 'Test\nOldPostTest\nTest'