1
;;; py-shell-arg-ert-tests.el --- py-shell ert tests
3
;; Copyright (C) 2015 Andreas Röhler
4
;; Author: Andreas Röhler <andreas.roehler@online.de>
5
;; Keywords: languages, convenience
7
;; This program is free software; you can redistribute it and/or modify
8
;; it under the terms of the GNU General Public License as published by
9
;; the Free Software Foundation, either version 3 of the License, or
10
;; (at your option) any later version.
12
;; This program is distributed in the hope that it will be useful,
13
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
;; GNU General Public License for more details.
17
;; You should have received a copy of the GNU General Public License
18
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
22
;; This file is generated by function from python-mode-utils.el - see in
23
;; directory devel. Edits here might not be persistent.
27
(ert-deftest py-ert-python-shell-test ()
28
(let ((py-python-command-args (list "-i -c\"abc=4\"")))
29
(py-kill-buffer-unconditional "*Python*")
31
(should (buffer-live-p (get-buffer "*Python*")))
32
(set-buffer (get-buffer "*Python*"))
33
(should (string= "4" py-result))
34
(should (< 1 comint-last-input-end))))
36
(ert-deftest py-ert-python2-shell-test ()
37
(let ((py-python2-command-args (list "-i -c\"abc=4\"")))
38
(py-kill-buffer-unconditional "*Python2*")
40
(should (buffer-live-p (get-buffer "*Python2*")))
41
(set-buffer (get-buffer "*Python2*"))
42
(should (string= "4" py-result))
43
(should (< 1 comint-last-input-end))))
45
(ert-deftest py-ert-python3-shell-test ()
46
(let ((py-python3-command-args (list "-i -c\"abc=4\"")))
47
(py-kill-buffer-unconditional "*Python3*")
49
(should (buffer-live-p (get-buffer "*Python3*")))
50
(set-buffer (get-buffer "*Python3*"))
51
(should (string= "4" py-result))
52
(should (< 1 comint-last-input-end))))
54
(ert-deftest py-ert-ipython-shell-test ()
55
(let ((py-ipython-command-args (list "-i -c\"abc=4\"")))
56
(py-kill-buffer-unconditional "*IPython*")
58
(should (buffer-live-p (get-buffer "*IPython*")))
59
(set-buffer (get-buffer "*IPython*"))
60
(should (string= "4" py-result))
61
(should (< 1 comint-last-input-end))))
63
(ert-deftest py-ert-ipython2.7-shell-test ()
64
(let ((py-ipython2.7-command-args (list "-i -c\"abc=4\"")))
65
(py-kill-buffer-unconditional "*IPython2.7*")
67
(should (buffer-live-p (get-buffer "*IPython2.7*")))
68
(set-buffer (get-buffer "*IPython2.7*"))
69
(should (string= "4" py-result))
70
(should (< 1 comint-last-input-end))))
72
(ert-deftest py-ert-ipython3-shell-test ()
73
(let ((py-ipython3-command-args (list "-i -c\"abc=4\"")))
74
(py-kill-buffer-unconditional "*IPython3*")
76
(should (buffer-live-p (get-buffer "*IPython3*")))
77
(set-buffer (get-buffer "*IPython3*"))
78
(should (string= "4" py-result))
79
(should (< 1 comint-last-input-end))))
81
(ert-deftest py-ert-jython-shell-test ()
82
(let ((py-jython-command-args (list "-i -c\"abc=4\"")))
83
(py-kill-buffer-unconditional "*Jython*")
85
(should (buffer-live-p (get-buffer "*Jython*")))
86
(set-buffer (get-buffer "*Jython*"))
87
(should (string= "4" py-result))
88
(should (< 1 comint-last-input-end))))
90
(provide 'py-shell-arg-ert-tests)
91
;;; py-shell-arg-ert-tests.el ends here