def test_1(): setup.start_emacs() output = setup.ask_emacs( ("(progn\n" " (pymacs-start-services)\n" " (not (null pymacs-transit-buffer)))\n"), "prin1" ) assert output == "t", output setup.stop_emacs()
def test_1(): setup.start_emacs() output = setup.ask_emacs(('(progn\n' ' (pymacs-start-services)\n' ' (not (null pymacs-transit-buffer)))\n'), 'prin1') assert output == 't', output setup.stop_emacs()
def validate(input, expected): output = setup.ask_emacs( input, '(lambda (expression)\n' ' (let ((pymacs-forget-mutability t))\n' ' (pymacs-print-for-eval expression)))\n') output = re.sub(r'\(pymacs-(defun|python) [0-9]*', r'(pymacs-\1 0', output) assert output == expected, (output, expected)
def notest_3(): value = setup.ask_emacs('nil\n', 'prin1') assert value == '8', repr(value)
def validate(input, expected): output = setup.ask_emacs(input, 'prin1') assert output == expected, (output, expected)
def validate(input, expected): output = setup.ask_emacs(input, 'prin1') output = re.sub(r'\(pymacs-(defun|python) [0-9]*', r'(pymacs-\1 0', output) assert output == expected, (output, expected)
def test_3(): setup.ask_emacs('(pymacs-exec "import os\nimport sys")')
def validate(input, expected): output = re.sub(r'\(pymacs-(defun|python) \. [0-9]*\)', r'(pymacs-\1 . 0)', setup.ask_emacs('(pymacs-eval %s)' % input, 'prin1')) assert output == expected, (output, expected)
def validate(input, expected): import re output = re.sub(r'\(pymacs-(defun|python) [0-9]*', r'(pymacs-\1 0', setup.ask_emacs(input, 'pymacs-print-for-eval')) assert output == expected, (output, expected)
def setup_module(module): setup.start_emacs() setup.ask_emacs('(defun print-for-eval-expanded (expression)\n' ' (let ((pymacs-forget-mutability t))\n' ' (pymacs-print-for-eval expression)))\n')