from tatsu.exceptions import FailedParse
from io import StringIO
import pytest
import pexpect
from .utils import expect_interaction, expect_output_exactly, create_play_file
from textwrap import dedent

NO_BREAKPOINTS = """
    A New Beginning.

    Hamlet, a literary/storage device.
    Juliet, an orator.

                        Act I: The Only Act.

                        Scene I: The Prince's Speech.

    [Enter Hamlet and Juliet]

    Juliet: Thou art the sum of an amazing healthy honest noble peaceful
            fine Lord and a lovely sweet golden summer's day. Speak your
            mind!

    Juliet: Thou art the sum of thyself and a King. Speak your mind!

            Thou art the sum of an amazing healthy honest hamster and a golden
            chihuahua. Speak your mind!

    [Exeunt]
"""

ONLY_INPUT = """
    Getting Input.

    Hamlet, a literary/storage device.
    Juliet, an orator.

            Act I: The Only Act.

            Scene I: The Prince Listens.

    [Enter Hamlet and Juliet]

    Juliet: Listen to your heart! Open your mind!
"""

BREAKPOINT = """
    A New Beginning.

    Hamlet, a literary/storage device.
    Juliet, an orator.

                        Act I: The Only Act.

                        Scene I: The Prince's Speech.

    [Enter Hamlet and Juliet]

    Juliet: Thou art the sum of an amazing healthy honest noble peaceful
            fine Lord and a lovely sweet golden summer's day. Speak your
            mind!

    [A pause]

    Juliet: Thou art the sum of thyself and a King. Speak your mind!

            Thou art the sum of an amazing healthy honest hamster and a golden
            chihuahua. Speak your mind!

    [Exeunt]
"""

LOOP = """