Example #1
0
    def test_multiple_after_separator(self):
        b = f'''
{DECK_MAIN}
2 Fervent Champion
2 Embercleave
{DECK_SB}
{DECK_OTHER}
----
1 Chandra, Acolyte of Flame
1 Chandra, Acolyte of Flame
1 Chandra, Acolyte of Flame
1 Chandra, Acolyte of Flame
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
2 Fervent Champion
2 Embercleave
{DECK_SB}
{DECK_OTHER}
----
1 Chandra, Acolyte of Flame
1 Chandra, Acolyte of Flame
1 Chandra, Acolyte of Flame
1 Chandra, Acolyte of Flame
'''.strip().splitlines()
        actual_result = move_cards(b, [6,7,8], 2)
        self.assertEqual(actual_result, expected_result)
Example #2
0
    def test_empty_deck(self):
        b = f'''
{DECK_MAIN}
{DECK_SB}
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
{DECK_SB}
'''.strip().splitlines()
        actual_result = move_cards(b, [0,1], 2)
        self.assertEqual(actual_result, expected_result)
Example #3
0
    def test_not_in_section(self):
        b = f'''
2 Fervent Champion
{DECK_MAIN}
{DECK_SB}
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
{DECK_SB}
2 Fervent Champion
'''.strip().splitlines()
        actual_result = move_cards(b, [0], 2)
        self.assertEqual(actual_result, expected_result)
Example #4
0
    def test_two_different_cards_from_main_to_sb(self):
        b = f'''
{DECK_MAIN}
2 Fervent Champion
2 Embercleave
{DECK_SB}
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
{DECK_SB}
2 Fervent Champion
2 Embercleave
'''.strip().splitlines()
        actual_result = move_cards(b, [1, 2], 2)
        self.assertEqual(actual_result, expected_result)
Example #5
0
    def test_all_lines(self):
        b = f'''
{DECK_MAIN}
2 Fervent Champion
2 Embercleave
{DECK_SB}
1 Chandra, Acolyte of Flame
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
{DECK_SB}
2 Fervent Champion
2 Embercleave
1 Chandra, Acolyte of Flame
'''.strip().splitlines()
        actual_result = move_cards(b, [0,1,2,3,4], 2)
        self.assertEqual(actual_result, expected_result)
Example #6
0
    def test_multiple_not_in_section(self):
        b = f'''
2 Fervent Champion
2 Embercleave
1 Chandra, Acolyte of Flame
{DECK_MAIN}
{DECK_SB}
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
{DECK_SB}
2 Fervent Champion
2 Embercleave
1 Chandra, Acolyte of Flame
'''.strip().splitlines()
        actual_result = move_cards(b, [0,1,2], 2)
        self.assertEqual(actual_result, expected_result)
Example #7
0
    def test_cards_from_different_sections_not_adjacent(self):
        b = f'''
{DECK_MAIN}
2 Fervent Champion
2 Embercleave
{DECK_SB}
1 Chandra, Acolyte of Flame
{DECK_OTHER}
'''.strip().splitlines()
        expected_result = f'''
{DECK_MAIN}
2 Embercleave
{DECK_SB}
{DECK_OTHER}
2 Fervent Champion
1 Chandra, Acolyte of Flame
'''.strip().splitlines()
        actual_result = move_cards(b, [1,4], 3)
        self.assertEqual(actual_result, expected_result)