bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25025: python-shell-calculate-command is wrong


From: Eli Zaretskii
Subject: bug#25025: python-shell-calculate-command is wrong
Date: Wed, 16 Aug 2017 19:57:30 +0300

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Wed, 16 Aug 2017 12:50:25 -0400
> Cc: Clément Pit--Claudel <clement.pit@gmail.com>, 
>       25025@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]