summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/python-tests.el
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix Python highlighting of some assignment statementskobarity2022-05-161-0/+160
| | | | | * lisp/progmodes/python.el (python-rx): Limit not-simple-operator to a single line (bug#51362).
* Make Python evaluation work more reliablyJin Choi2022-04-301-15/+3
| | | | | | | * lisp/progmodes/python.el (python-shell-buffer-substring): Make more regions valid Python code (bug#55174). Copyright-paperwork-exempt: yes
* python.el: Try and better split the Tramp codeStefan Monnier2022-02-041-26/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Massage the Python-Tramp code so that the Tramp part and the Python part are a bit less intertwined. It's still not quite right, but it's a bit closer to the point where the Tramp part can be moved to `tramp.el`. * lisp/progmodes/python.el: Don't require `tramp-sh`. Do require `subr-x` OTOH. Remove redundant `:group`s. (python-shell--calculate-process-environment): New function, that only return the entries to be added. (python-shell-calculate-process-environment): Rewrite and declare obsolete. (python-shell-tramp-refresh-remote-path) (python-shell-tramp-refresh-process-environment): Silence compiler warnings. (python-shell-with-environment): Move the bulk of its code to a new function `python-shell--with-environment` for easier debugging and to avoid code duplication. (python-shell--with-environment): New function. Split the Tramp case into its own function. (python-shell--tramp-with-environment): New function. (python-eldoc-function-timeout-permanent): Fix doc's first line. * test/lisp/progmodes/python-tests.el: Adjust accordingly. (python-shell-calculate-process-environment-1) (python-shell-calculate-process-environment-2) (python-shell-calculate-process-environment-3) (python-shell-calculate-process-environment-4) (python-shell-calculate-process-environment-5) (python-shell-calculate-process-environment-6) (python-shell-calculate-process-environment-7) (python-shell-calculate-process-environment-8): Use `python-shell--calculate-process-environment`. (python--tests-process-env-canonical, python--tests-process-env-eql): New functions. (python-shell-with-environment-2, python-shell-with-environment-3): Use them.
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Merge from origin/emacs-28Stefan Kangas2021-12-131-6/+12
|\| | | | | | | | | | | | | | | 9bd3f78645 Make `M-x run-python' select the window again 62139aeb42 * lisp/tab-bar.el (tab-bar-switch-to-last-tab): Add 'abs' ... ea8422204f * make-dist (manifest): Filter out msdos/autogen/* files. b5354e989d Rewrite the "Quitting Windows" section of Emacs Lisp Refer... 64ea1a178c Fix eshell for systems that do not have subprocesses
| * Make `M-x run-python' select the window againKévin Le Gouguec2021-12-131-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interactively, we want M-x run-python to focus the interpreter buffer. The previous code failed in two ways: - the call to 'display-buffer' was not reached if an interpreter was already running, - set-buffer is ineffectual if the interpreter's window is not selected: once Emacs returns to the command loop, the current buffer will revert back to what the selected window contains. * lisp/progmodes/python.el (python-shell-make-comint): Handle the SHOW argument regardless of whether an interpreter buffer exists, and use pop-to-buffer to select the window. (run-python): Delegate buffer management to 'python-shell-make-comint'. * test/lisp/progmodes/python-tests.el (python-tests--run-python-selects-window): Rename from 'python-tests--bug31398', and adjust assertions (bug#52380).
* | Prefer ert-with-temp-(directory|file)Stefan Kangas2021-11-071-11/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/abbrev-tests.el (read-write-abbrev-file-test) (read-write-abbrev-file-test-with-props) (abbrev-edit-save-to-file-test): * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret) (auth-source-delete): * test/lisp/autoinsert-tests.el (autoinsert-tests-auto-insert-file): * test/lisp/bookmark-tests.el (with-bookmark-test-save-load): * test/lisp/buff-menu-tests.el (buff-menu-24962): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-export): * test/lisp/calendar/todo-mode-tests.el (with-todo-test): * test/lisp/dired-tests.el (dired-test-bug27243-01, dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27631) (dired-test-bug27968, dired-test-with-temp-dirs): * test/lisp/dired-x-tests.el (dired-test-bug25942): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-scan) (check-declare-tests-verify-mismatch): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env): * test/lisp/emacs-lisp/package-tests.el (with-package-test) (package-test-signed): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-markup-region) (testcover-tests-run-test-case): * test/lisp/emulation/viper-tests.el (viper-test-undo-kmacro): * test/lisp/epg-tests.el (with-epg-tests): * test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history): * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631): * test/lisp/ffap-tests.el (ffap-tests-25243): * test/lisp/files-tests.el (files-tests-bug-18141) (files-tests-read-file-in-~, files-tests-make-directory) (files-tests-copy-directory, files-tests-executable-find) (files-tests-dont-rewrite-precious-files) (files-tests--save-some-buffers): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27631): * test/lisp/mail/uudecode-tests.el (uudecode-tests-decode-region-internal) (uudecode-tests-decode-region-external): * test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file): * test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive): * test/lisp/progmodes/etags-tests.el (etags-buffer-local-tags-table-list): * test/lisp/progmodes/flymake-tests.el (ruby-backend): * test/lisp/progmodes/python-tests.el (python-tests-with-temp-file): * test/lisp/progmodes/sql-tests.el (with-sql-test-connect-harness): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/file) (saveplace-test-forget-unreadable-files) (saveplace-test-place-alist-to-file): * test/lisp/so-long-tests/spelling-tests.el: * test/lisp/textmodes/reftex-tests.el (reftex-locate-bibliography-files) (reftex-parse-from-file-test): * test/lisp/thumbs-tests.el (thumbs-tests-thumbsdir/create-if-missing): * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-bug32173-02, wdired-test-symlink-name) (wdired-test-unfinished-edit-01, wdired-test-bug34915) (wdired-test-bug39280): * test/src/buffer-tests.el (test-kill-buffer-auto-save-default): * test/src/filelock-tests.el (filelock-tests--fixture): * test/src/inotify-tests.el (inotify-file-watch-simple): * test/src/undo-tests.el (undo-test-file-modified): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly. In some cases, this is just cleanup, but in several cases this fixes bugs where an error would have lead to us not cleaning up.
* Make syntax-ppss more accurate for Python triple quotes (bug#49518)João Távora2021-09-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By putting delimiter syntax on the last character of Python triple-quoted strings, this makes syntax-ppss be more accurate. Previously: emacs -Q something.py type two single quotes M-: (nth 3 (syntax-ppss)) notice how the return value says you're outside a string, correctly type another quote M-: (nth 3 (syntax-ppss)) notice how the return value says you're inside a string, correctly backspace the quote just entered M-: (nth 3 (syntax-ppss)) notice how the return value says you're inside a string, incorrectly With this patch the last step is corrected. This helps things like electric-pair-mode. Also, the test python-syntax-after-python-backspace now passes, again. * lisp/progmodes/python.el (python-syntax-stringify): Put delimiter syntax in "inner" of the surrouding triple quotes. * test/lisp/progmodes/python-tests.el (python-syntax-after-python-backspace): Passes again.
* Expand and improve electric-pair-mode and Python testing (bug#49518)João Távora2021-09-211-1/+28
| | | | | | | | | | | | | | | | | | In python-tests.el, the triple-quote pairing tests are passing incorrectly, i.e. the auto-pairing functionality they purport to guard isn't really working for users trying it interactively. Added a new failing test, soon to be fixed. In electric-tests.el, added tests for Python, too. * test/lisp/electric-tests.el (define-electric-pair-test): Also run main tests for python-mode. (pair-some-quotes-skip-others): Test another slightly different pairing. * test/lisp/progmodes/python-tests.el (python-triple-double-quote-pairing): Rename from python-triple-quote-pairing. (python-triple-single-quote-pairing): New test.
* Fix filling of overlong first lines in Python doc stringsDeneb Meketa2021-05-271-0/+24
| | | | | | | * lisp/progmodes/python.el (python-fill-string): Fill overlong first lines correctly (bug#20860). Copyright-paperwork-exempt: yes
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Revert "Adjust python tests after fix for bug#39398"Lars Ingebrigtsen2020-10-301-3/+3
| | | | | | This reverts commit c6fb23873a594b6a4fc57fa107869a2e82159d07. The code is tweaked to be more backwards-compatible.
* Adjust python tests after fix for bug#39398Lars Ingebrigtsen2020-10-281-3/+3
|
* ; Prefer https to http in more URLsStefan Kangas2020-10-241-1/+1
| | | | These were all tested and confirmed working.
* ; Fix more typosStefan Kangas2020-10-031-2/+2
|
* Merge from origin/emacs-27Glenn Morris2020-07-111-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | c04b92104c Add commentary in gtkutil.c 6290850dac Consistently stylize eldoc as ElDoc in prose 136e931189 Improve documentation of "C-u C-x =" 1f52771fd3 Mention floating rounding issues c892ae65b4 Repair global-auto-revert-ignore-modes (bug#42271) 3a446a02fb ; * src/xdisp.c (decode_mode_spec): Fix commentary. 79f381b4a6 One more improvement of left/right-fringe display spec docs 1279bdb072 Another clarification of left/right-fringe display spec # Conflicts: # doc/emacs/programs.texi
| * Consistently stylize eldoc as ElDoc in proseBasil L. Contovounesios2020-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Specifying File Variables): * doc/emacs/modes.texi (Major Modes): * doc/emacs/programs.texi (Lisp Doc): * etc/NEWS.22: * etc/NEWS.23: * lisp/progmodes/python.el: (python-eldoc-function): * test/lisp/progmodes/python-tests.el: Consistently capitalize eldoc as ElDoc rather than Eldoc.
* | Use lexical-binding in most progmodes testsStefan Kangas2020-04-281-6/+5
|/ | | | | | | | | | | | | | | * test/lisp/progmodes/etags-tests.el: * test/lisp/progmodes/f90-tests.el: * test/lisp/progmodes/ps-mode-tests.el: * test/lisp/progmodes/python-tests.el: * test/lisp/progmodes/ruby-mode-tests.el: * test/lisp/progmodes/subword-tests.el: * test/lisp/progmodes/tcl-tests.el: * test/lisp/progmodes/xref-tests.el: Use lexical-binding. * test/lisp/progmodes/python-tests.el (python-tests-visible-string) (python-tests-look-at-1, python-tests-look-at-2) (python-shell-calculate-process-environment-2): Silence byte-compiler.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Fix fill-paragraph in python docstrings (Bug#36056)Noam Postavsky2019-09-121-1/+12
| | | | | | | | | | * lisp/progmodes/python.el (python-do-auto-fill): New function. (python-mode): Set it as normal-auto-fill-function, and don't set fill-indent-according-to-mode. Having the latter set during fill-paragraph gives wrongs result, because python-indent-line doesn't remove indentation added by filling. * test/lisp/progmodes/python-tests.el (python-fill-docstring): New test.
* Merge from emacs-26Noam Postavsky2019-06-251-5/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347) 06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary. 572e34bb6f Rename 'make-symbolic-link' argument NEWNAME to LINKNAME 04477adedc Check that length of data returned by sysctl is non-zero 81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): D... 9d48979ca8 Fix Python tests depending on system-type fcf6cc3177 Fix problem with wdired test when symlinks cannot be created. 4701e0663e Improve wording of documentation of click events # Conflicts: # lisp/textmodes/sgml-mode.el # test/lisp/textmodes/sgml-mode-tests.el
| * * test/lisp/progmodes/python-tests.el (python-virt-bin): Doc fix.Juanma Barranquero2019-06-171-1/+1
| |
| * Fix Python tests depending on system-typeJuanma Barranquero2019-06-171-5/+15
| | | | | | | | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-virt-bin): New function. (python-shell-calculate-exec-path-2) (python-shell-calculate-exec-path-3) (python-shell-calculate-exec-path-4) (python-shell-with-environment-1, python-shell-with-environment-2): Use it.
* | Fix python docstring auto-fill (Bug#36056)Noam Postavsky2019-06-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-mode): Set fill-indent-according-to-mode locally to t. This lets auto-fill do the right thing when auto-filling inside a docstring. The default was to nil on 2001-11-25 "(fill-indent-according-to-mode): Default to nil" with the comment that it "screws up CC-mode's filling tricks". But presumably it shouldn't be a problem for python-mode. * test/lisp/progmodes/python-tests.el (python-auto-fill-docstring): New test.
* | ; Add test for previous changeNoam Postavsky2019-04-281-0/+13
| | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren): New test.
* | Replace (skip-unless nil) by tag :unstable in test packagesMichael Albinus2019-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/filenotify-tests.el (file-notify--deftest-remote): Use tag :unstable if SKIP is non-nil. * test/lisp/net/tramp-tests.el (tramp-test36-vc-registered): Use ert-skip instead of (skip-unless nil). * test/lisp/progmodes/python-tests.el (python-tests--python-nav-end-of-statement--infloop): Use tag :unstable instead of (skip-unless nil).
* | * test/lisp/progmodes/python-tests.el: "Fix" failing testStefan Monnier2019-04-101-0/+10
| | | | | | | | (python-tests--python-nav-end-of-statement--infloop): Disable.
* | * test/lisp/progmodes/python-tests.elGlenn Morris2019-03-131-2/+1
| | | | | | | | | | | | (python-syntax-after-python-backspace): Expect failure again. ; since 5feaf90
* | * test/lisp/progmodes/python-tests.elGlenn Morris2019-03-021-1/+2
| | | | | | | | (python-syntax-after-python-backspace): Expect success.
* | Fix electric indent bug in python-mode after dedenting colonJoel Rosdahl2019-01-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | * list/progmodes/python.el (python-indent-post-self-insert-function): Use markers instead of positions when reindenting statement(s) after inserting electric colon to avoid reindenting too many statements (bug#22663). * test/lisp/progmodes/python-tests.el (python-indent-electric-colon-2): Improve test case to also verify the fix of bug#22663. Copyright-paperwork-exempt: yes
* | Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\| | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Fix off by one error in python-mode assertion (Bug#30964)Noam Postavsky2018-06-161-0/+6
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-nav-end-of-statement): Don't assert that string-start is strictly greater than last-string-end, because the string end is a position outside of the string and may therefore be the same as the following string's start. * test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-2): New test.
* | Run python test if the python executable is foundTino Calancha2018-05-151-0/+1
| | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-tests--bug31398): Skip test when executable python is no found.
* | run-python: Make the buffer running python currentTino Calancha2018-05-151-0/+8
|/ | | | | | | | * lisp/progmodes/python.el (run-python, python-shell-make-comint): Make the buffer running the inferior python process the current buffer (Bug#31398). * test/lisp/progmodes/python-tests.el (python-tests--bug31398): Add test.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Add tests on electric-indentation and Python multiline strings (Bug#29305)Lele Gaifax2017-12-021-0/+31
| | | | | | * test/lisp/progmodes/python-tests.el (python-indent-electric-comma-inside-multiline-string, python-indent-electric-comma-after-multiline-string): New tests.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Fix a mis-binding in a testReuben Thomas2017-09-011-1/+1
| | | | | | | | | * test/lisp/progmodes/python-tests.el (python-shell-calculate-process-environment-3): Fix binding of process-environment. A level of parens was missing. This was found after Glenn Morris noticed a similar problem with the patch for Bug#28319.
* ; Remove python-shell-calculate-command-1 testNoam Postavsky2017-08-201-14/+0
| | | | | | | * test/lisp/progmodes/python-tests.el (python-shell-calculate-pythonpath-1): Remove, it merely reprises the body of `python-shell-calculate-command' and it has been broken on w32 since the fix for Bug#25025 was applied.
* ; Fix backslashes in python-testsNoam Postavsky2017-05-281-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-indent-after-backslash-1) (python-indent-after-backslash-2) (python-indent-after-backslash-3) (python-indent-after-backslash-4) (python-indent-after-backslash-5) (python-nav-beginning-of-statement-1) (python-nav-end-of-statement-1) (python-nav-forward-statement-1) (python-nav-backward-statement-1) (python-nav-backward-statement-2) (python-info-statement-starts-block-p-2) (python-info-statement-ends-block-p-2) (python-info-beginning-of-statement-p-2) (python-info-end-of-statement-p-2) (python-info-beginning-of-block-p-2) (python-info-end-of-block-p-2) (python-info-line-ends-backslash-p-1) (python-info-beginning-of-backslash-1) (python-info-continuation-line-p-1) (python-info-block-continuation-line-p-1) (python-info-assignment-statement-p-1) (python-info-assignment-continuation-line-p-1): Backslashes in literals should be doubled only once to produce one backslash in the buffer. If there backslashes inside a Python string literal in a Lisp literal, that would need to be doubled twice, but there are no such cases. Note that `python-tests-looking-at' takes a plain string, not a regexp.
* ; Update test for previous changeNoam Postavsky2017-05-281-4/+4
| | | | | | * test/lisp/progmodes/python-tests.el (python-indent-after-backslash-4): Indent after backslash is now python-indent-offset.
* ; Set transient-mark-mode to let mark-defun tests passNoam Postavsky2017-05-201-2/+4
| | | | | | | The tests fail when transient-mark-mode is not set since 2017-05-12 "Fix Bug#21072 and rework `mark-defun'". * test/lisp/progmodes/python-tests.el (python-mark-defun-1) (python-mark-defun-2): Bind 'transient-mark-mode' to t.
* Fix a test in python-test.elTino Calancha2017-04-041-1/+1
| | | | | | | | | | | Fix a test that breaks the test suite when it is run within a virtual environment. See following link for details: https://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00857.html * test/lisp/progmodes/python-tests.el (python-shell-calculate-process-environment-7): Bind python-shell-virtualenv-root to VIRTUAL_ENV when this var is set; otherwise bind it to '/env'.
* Protect against an infloop in python-modePhilipp Stephani2017-03-231-0/+19
| | | | | | | | | | | | | | | | | There appears to be an edge case caused by using `syntax-ppss' in a narrowed buffer during JIT lock inside of Python triple-quote strings. Unfortunately it is impossible to reproduce without manually destroying the syntactic information in the Python buffer, but it has been observed in practice. In that case it can happen that the syntax caches get sufficiently out of whack so that there appear to be overlapping strings in the buffer. As Python has no nested strings, this situation is impossible and leads to an infloop in `python-nav-end-of-statement'. Protect against this by checking whether the search for the end of the current string makes progress. * python.el (python-nav-end-of-statement): Protect against infloop. * progmodes/python-tests.el (python-tests--python-nav-end-of-statement--infloop): Add unit test.
* test/*.el: Avoid byte-compiler warningsJuanma Barranquero2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/abbrev-tests.el (abbrev-table-p-test): Remove unused 'let*'. * test/lisp/faces-tests.el (faces--test): New customization group. (faces--test1, faces--test2): Use it. * test/lisp/ffap-tests.el (ffap-tests-25243): Call 'mark-whole-buffer' interactively. * test/lisp/ibuffer-tests.el (ibuffer-filter-groups, ibuffer-filtering-alist) (ibuffer-filtering-qualifiers, ibuffer-save-with-custom) (ibuffer-saved-filter-groups, ibuffer-saved-filters): Defvar. (ibuffer-format-qualifier, ibuffer-unary-operand): Declare. * test/lisp/minibuffer-tests.el (completion-test1): Mark unused lexical arguments. * test/lisp/simple-tests.el (simple-test--dummy-buffer): Wrap result in 'with-no-warnings' to avoid them when the macro is invoked for effect. * test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-count-test): Mark unused lexical arguments. * test/lisp/emacs-lisp/let-alist-tests.el (let-alist-surface-test): Mark unused lexical arguments. (let-alist-cons): Remove unused let binding. * test/lisp/net/dbus-tests.el (dbus-debug): Defvar. (dbus-get-unique-name): Declare. * test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Call 'font-lock-fontify-buffer' interactively. * test/lisp/textmodes/tildify-tests.el (tildify-space-undo-test--test): Mark unused lexical argument.
* python-mode: Fix detection for opening blocks.Hong Xu2017-01-261-0/+21
| | | | | | | | | * python.el (python-info-dedenter-opening-block-positions): There can't be any back-indented lines between an opening block and the current line. * python-tests.el (python-indent-electric-colon-4): Add an indent test case where there is one-more indented previous opening block.
* Fix extracting async def type and name in python mode imenuDmitry Lazurkin2017-01-121-2/+10
| | | | | | | | | | * lisp/progmodes/python.el (python-imenu--get-defun-type-name): New function. (python-imenu--build-tree): Use python-imenu--get-defun-type-name for extract async or simple def type and name at current position (Bug#24820). * test/lisp/progmodes/python-tests.el (python-imenu-create-index-1): (python-imenu-create-flat-index-1): Add async def's.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
| | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017