# Path: simfile/notes/group.py
# class SameBeatNotes(Enum):
#     """
#     Choices for :func:`group_notes`' `same_beat_notes` parameter.
#     
#     When multiple notes land on the same beat...
# 
#     * `KEEP_SEPARATE`: each note is emitted separately
#     * `JOIN_BY_NOTE_TYPE`: notes of the same type are emitted together
#     * `JOIN_ALL`: all notes are emitted together
#     """
#     KEEP_SEPARATE = 1
#     JOIN_BY_NOTE_TYPE = 2
#     JOIN_ALL = 3


import unittest
from .helpers import *
from .. import *
from ..group import SameBeatNotes
from ..count import *



class TestNoteCounter(unittest.TestCase):
    def test_count_steps(self):
        count = count_steps(testing_notes())
        self.assertEqual(19, count)
    
    def test_count_steps_include_note_types(self):
        count = count_steps(testing_notes(), include_note_types=set((NoteType.TAP,)))
        self.assertEqual(15, count)

    def test_count_steps_same_beat_notes_join_by_note_type(self):
        count = count_steps(
            testing_notes(),
            include_note_types=set((NoteType.MINE, NoteType.TAIL)),
            same_beat_notes=SameBeatNotes.JOIN_BY_NOTE_TYPE,
        )
        self.assertEqual(4, count)
    
    def test_count_steps_same_beat_notes_keep_separate(self):
        count = count_steps(
            testing_notes(),
            include_note_types=set((NoteType.MINE, NoteType.TAIL)),

# Path: simfile/notes/group.py
# class SameBeatNotes(Enum):
#     """
#     Choices for :func:`group_notes`' `same_beat_notes` parameter.
#     
#     When multiple notes land on the same beat...
# 
#     * `KEEP_SEPARATE`: each note is emitted separately
#     * `JOIN_BY_NOTE_TYPE`: notes of the same type are emitted together
#     * `JOIN_ALL`: all notes are emitted together
#     """
#     KEEP_SEPARATE = 1
#     JOIN_BY_NOTE_TYPE = 2
#     JOIN_ALL = 3


# Path: simfile/notes/tests/test_count.py
import unittest
from .helpers import *
from .. import *
from ..group import SameBeatNotes
from ..count import *




class TestNoteCounter(unittest.TestCase):
    def test_count_steps(self):
        count = count_steps(testing_notes())
        self.assertEqual(19, count)
    
    def test_count_steps_include_note_types(self):
        count = count_steps(testing_notes(), include_note_types=set((NoteType.TAP,)))
        self.assertEqual(15, count)

    def test_count_steps_same_beat_notes_join_by_note_type(self):
        count = count_steps(
            testing_notes(),
            include_note_types=set((NoteType.MINE, NoteType.TAIL)),
            same_beat_notes=SameBeatNotes.JOIN_BY_NOTE_TYPE,
        )
        self.assertEqual(4, count)
    
    def test_count_steps_same_beat_notes_keep_separate(self):
        count = count_steps(
            testing_notes(),
            include_note_types=set((NoteType.MINE, NoteType.TAIL)),

            same_beat_notes=SameBeatNotes.KEEP_SEPARATE,