# Path: ejtp/util/compat.py



import os
import imp
import sys
import json
import tempfile
import time
import subprocess
from ejtp.util.compat import unittest
from ejtp.tests.resource_path import *

    def setUp(self):
        set_environ()
        self.io = IOMock()
        self.console = import_as_module('ejtp-console')
        self.inter = self.console.Interactive()

    def _assertCLI(self, expected):
        with IOAssert(self, expected):
            self.assertRaises(SystemExit, self.inter.repl)

    def test_quit(self):
        expected = '''
        What interface do you want to use?
        Available interfaces:
        $ mitzi@lackadaisy.com
        Enter a command
        $ quit
        '''
        self._assertCLI(expected)

    def test_eval(self):
        expected = '''
        What interface do you want to use?
        Available interfaces:
        $ mitzi@lackadaisy.com
        Enter a command
        $ eval
        $ 2 ** 10
        1024

# Path: ejtp/util/compat.py



# Path: ejtp/tests/test_scripts.py
import os
import imp
import sys
import json
import tempfile
import time
import subprocess
from ejtp.util.compat import unittest
from ejtp.tests.resource_path import *


    def setUp(self):
        set_environ()
        self.io = IOMock()
        self.console = import_as_module('ejtp-console')
        self.inter = self.console.Interactive()

    def _assertCLI(self, expected):
        with IOAssert(self, expected):
            self.assertRaises(SystemExit, self.inter.repl)

    def test_quit(self):
        expected = '''
        What interface do you want to use?
        Available interfaces:
        $ mitzi@lackadaisy.com
        Enter a command
        $ quit
        '''
        self._assertCLI(expected)

    def test_eval(self):
        expected = '''
        What interface do you want to use?
        Available interfaces:
        $ mitzi@lackadaisy.com
        Enter a command
        $ eval
        $ 2 ** 10
        1024

        Enter a command