Пример #1
0
    def test_add_main_twice(self):
        b = f'''
{DECK_MAIN}
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
'''.strip().splitlines()
        actual_result = add_section(b, 1)
        self.assertEqual(actual_result, expected_result)
Пример #2
0
    def test_add_sb(self):
        b = f'''
{DECK_MAIN}
2 Fervent Champion
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
2 Fervent Champion
{DECK_SB}
'''.strip().splitlines()
        actual_result = add_section(b, 2)
        self.assertEqual(actual_result, expected_result)
Пример #3
0
 def test_add_main_one_empty_line(self):
     # this is what a real vim empty buffer will look like
     b = ['']
     expected_result = [f'{DECK_MAIN}']
     actual_result = add_section(b, 1)
     self.assertEqual(actual_result, expected_result)
Пример #4
0
 def test_add_main(self):
     b = []
     expected_result = [f'{DECK_MAIN}']
     actual_result = add_section(b, 1)
     self.assertEqual(actual_result, expected_result)