Example #1
0
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()
Example #2
0
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()
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
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)
Example #7
0
 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)
Example #10
0
 def validate(input, expected):
     output = setup.ask_emacs(input, 'prin1')
     assert output == expected, (output, expected)
Example #11
0
def test_3():

    setup.ask_emacs('(pymacs-exec "import os\nimport sys")')
Example #12
0
 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)
Example #13
0
 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)
Example #14
0
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')
Example #15
0
 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)
Example #16
0
def notest_3():
    value = setup.ask_emacs('nil\n', 'prin1')
    assert value == '8', repr(value)
Example #17
0
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')
Example #18
0
 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)