GNU bug report logs - #25025
python-shell-calculate-command is wrong

Previous Next

Package: emacs;

Reported by: Fabrice Popineau <fabrice.popineau <at> gmail.com>

Date: Fri, 25 Nov 2016 06:26:01 UTC

Severity: normal

Tags: confirmed, fixed

Merged with 20744

Found in version 25.1

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 25025 <at> debbugs.gnu.org, clement.pit <at> gmail.com
Subject: bug#25025: python-shell-calculate-command is wrong
Date: Wed, 16 Aug 2017 19:57:30 +0300
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Date: Wed, 16 Aug 2017 12:50:25 -0400
> Cc: Clément Pit--Claudel <clement.pit <at> gmail.com>, 
> 	25025 <at> debbugs.gnu.org
> 
> (ert-deftest python-shell-calculate-command-1 ()
>   "Check the command to execute is calculated correctly.
> Using `python-shell-interpreter' and
> `python-shell-interpreter-args'."
>   (skip-unless (executable-find python-tests-shell-interpreter))
>   (let ((python-shell-interpreter (executable-find
>                                    python-tests-shell-interpreter))
>         (python-shell-interpreter-args "-B"))
>     (should (string=
>              (format "%s %s"
>                      (shell-quote-argument python-shell-interpreter)
>                      python-shell-interpreter-args)
>              (python-shell-calculate-command)))))
> 
> This is the old version of python-shell-calculate-command:
> 
> (defun python-shell-calculate-command ()
>   "Calculate the string used to execute the inferior Python process."
>   (format "%s %s"
>           (shell-quote-argument python-shell-interpreter)
>           python-shell-interpreter-args))
> 
> As you can see, the test just repeats the function body and checks for
> equality.

I see, thanks.  So I guess all it (maybe) tests is that
python-shell-interpreter and what executable-find returns are
identical?  Is that something that could somehow fail and would be
useful to verify?  If not, I agree to removing the test.




This bug report was last modified 7 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.