- "Check the internal process name is config-unique."
- (let* ((python-shell-interpreter python-tests-shell-interpreter)
- (python-shell-interpreter-args "")
- (python-shell-prompt-regexp ">>> ")
- (python-shell-prompt-block-regexp "[.][.][.] ")
- (python-shell-setup-codes "")
- (python-shell-process-environment "")
- (python-shell-extra-pythonpaths "")
- (python-shell-exec-path "")
- (python-shell-virtualenv-path "")
- (expected (python-tests-with-temp-buffer
- "" (python-shell-internal-get-process-name))))
- ;; Same configurations should match.
- (should
- (string= expected
- (python-tests-with-temp-buffer
- "" (python-shell-internal-get-process-name))))
- (let ((python-shell-interpreter-args "-B"))
- ;; A minimal change should generate different names.
- (should
- (not (string=
- expected
- (python-tests-with-temp-buffer
- "" (python-shell-internal-get-process-name))))))))
-
-(ert-deftest python-shell-parse-command-1 ()
+ "Check the internal process name is buffer-unique sans `buffer-file-name'."
+ (python-tests-with-temp-buffer
+ ""
+ (should (string= (python-shell-internal-get-process-name)
+ (format "%s[%s]" python-shell-internal-buffer-name (buffer-name))))))
+
+(ert-deftest python-shell-internal-get-process-name-2 ()
+ "Check the internal process name is buffer-unique with `buffer-file-name'."
+ (python-tests-with-temp-file
+ ""
+ (should (string= (python-shell-internal-get-process-name)
+ (format "%s[%s]" python-shell-internal-buffer-name (buffer-name))))))
+
+(ert-deftest python-shell-calculate-command-1 ()