~python-mode-devs/python-mode/python-mode

« back to all changes in this revision

Viewing changes to test/py-completion-tests.el

  • Committer: Barry Warsaw
  • Date: 2017-02-24 21:38:07 UTC
  • Revision ID: barry@python.org-20170224213807-h762012vx6fgvrve
Move repo to GitLab

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
;;; py-completion-tests.el --- Test completion for available Python shell
2
 
 
3
 
;; Author: Andreas Roehler <andreas.roehler@online.de>
4
 
;; Keywords: languages, convenience
5
 
 
6
 
;; This program is free software; you can redistribute it and/or modify
7
 
;; it under the terms of the GNU General Public License as published by
8
 
;; the Free Software Foundation, either version 3 of the License, or
9
 
;; (at your option) any later version.
10
 
 
11
 
;; This program is distributed in the hope that it will be useful,
12
 
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
;; GNU General Public License for more details.
15
 
 
16
 
;; You should have received a copy of the GNU General Public License
17
 
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 
 
19
 
;;; Commentary: Edit `py-test-pyshellname-list' before
20
 
;; running this test-builder or give a list of shells as
21
 
;; arguments
22
 
 
23
 
;;; Code:
24
 
 
25
 
(defun python-complete-test (&optional arg)
26
 
  (interactive "p")
27
 
  (let ((teststring "#! /usr/bin/env python
28
 
pri"))
29
 
    (py-bug-tests-intern 'python-complete-base arg teststring)))
30
 
 
31
 
(defun python-complete-base ()
32
 
  (save-excursion (completion-at-point))
33
 
  ;; (sit-for 0.1)
34
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
35
 
 
36
 
(defun usr-bin-python-complete-test (&optional arg)
37
 
  (interactive "p")
38
 
  (let ((teststring "#! /usr/bin/python
39
 
pri"))
40
 
    (py-bug-tests-intern 'usr-bin-python-complete-base arg teststring)))
41
 
 
42
 
(defun usr-bin-python-complete-base ()
43
 
  (save-excursion (completion-at-point))
44
 
  ;; (sit-for 0.1)
45
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
46
 
 
47
 
(defun usr-bin-python2.7-complete-test (&optional arg)
48
 
  (interactive "p")
49
 
  (let ((teststring "#! /usr/bin/python2.7
50
 
pri"))
51
 
    (py-bug-tests-intern 'usr-bin-python2.7-complete-base arg teststring)))
52
 
 
53
 
(defun usr-bin-python2.7-complete-base ()
54
 
  (save-excursion (completion-at-point))
55
 
  ;; (sit-for 0.1)
56
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
57
 
 
58
 
(defun home-speck-arbeit-python-epdfree-epd_free-7.2-2-rh5-x86-bin-python2.7-complete-test (&optional arg)
59
 
  (interactive "p")
60
 
  (let ((teststring "#! /home/speck/arbeit/python/epdfree/epd_free-7.2-2-rh5-x86/bin/python2.7
61
 
pri"))
62
 
    (py-bug-tests-intern 'home-speck-arbeit-python-epdfree-epd_free-7.2-2-rh5-x86-bin-python2.7-complete-base arg teststring)))
63
 
 
64
 
(defun home-speck-arbeit-python-epdfree-epd_free-7.2-2-rh5-x86-bin-python2.7-complete-base ()
65
 
  (save-excursion (completion-at-point))
66
 
  ;; (sit-for 0.1)
67
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
68
 
 
69
 
(defun usr-bin-python3-complete-test (&optional arg)
70
 
  (interactive "p")
71
 
  (let ((teststring "#! /usr/bin/python3
72
 
pri"))
73
 
    (py-bug-tests-intern 'usr-bin-python3-complete-base arg teststring)))
74
 
 
75
 
(defun usr-bin-python3-complete-base ()
76
 
  (save-excursion (completion-at-point))
77
 
  ;; (sit-for 0.1)
78
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
79
 
 
80
 
(defun usr-bin-python3.1-complete-test (&optional arg)
81
 
  (interactive "p")
82
 
  (let ((teststring "#! /usr/bin/python3.1
83
 
pri"))
84
 
    (py-bug-tests-intern 'usr-bin-python3.1-complete-base arg teststring)))
85
 
 
86
 
(defun usr-bin-python3.1-complete-base ()
87
 
  (save-excursion (completion-at-point))
88
 
  ;; (sit-for 0.1)
89
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
90
 
 
91
 
(defun ipython-complete-test (&optional arg)
92
 
  (interactive "p")
93
 
  (let ((teststring "#! /usr/bin/env ipython
94
 
pri"))
95
 
    (py-bug-tests-intern 'ipython-complete-base arg teststring)))
96
 
 
97
 
(defun ipython-complete-base ()
98
 
  (save-excursion (completion-at-point))
99
 
  ;; (sit-for 0.1)
100
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
101
 
 
102
 
(defun usr-bin-ipython-complete-test (&optional arg)
103
 
  (interactive "p")
104
 
  (let ((teststring "#! /usr/bin/ipython
105
 
pri"))
106
 
    (py-bug-tests-intern 'usr-bin-ipython-complete-base arg teststring)))
107
 
 
108
 
(defun usr-bin-ipython-complete-base ()
109
 
  (save-excursion (completion-at-point))
110
 
  ;; (sit-for 0.1)
111
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
112
 
 
113
 
(defun home-speck-arbeit-python-epd_free-7.1-2-rh5-x86-bin-ipython-complete-test (&optional arg)
114
 
  (interactive "p")
115
 
  (let ((teststring "#! /home/speck/arbeit/python/epd_free-7.1-2-rh5-x86/bin/ipython
116
 
pri"))
117
 
    (py-bug-tests-intern 'home-speck-arbeit-python-epd_free-7.1-2-rh5-x86-bin-ipython-complete-base arg teststring)))
118
 
 
119
 
(defun home-speck-arbeit-python-epd_free-7.1-2-rh5-x86-bin-ipython-complete-base ()
120
 
  (save-excursion (completion-at-point))
121
 
  ;; (sit-for 0.1)
122
 
  (assert (looking-at "nt") nil "py-completion-at-point-test failed"))
123
 
 
124
 
 
125
 
(provide "py-completion-tests")
126
 
;;; py-completion-tests ends here
127