emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r113197: * python-tests.el (python-tests-with-temp-f


From: Glenn Morris
Subject: [Emacs-diffs] trunk r113197: * python-tests.el (python-tests-with-temp-file): Clean up after ourself
Date: Thu, 27 Jun 2013 05:46:57 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113197
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-06-26 22:46:51 -0700
message:
  * python-tests.el (python-tests-with-temp-file): Clean up after ourself
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/python-tests.el 
pythontests.el-20130220195218-kqcioz3fssz9hwe1-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-06-27 02:16:53 +0000
+++ b/test/ChangeLog    2013-06-27 05:46:51 +0000
@@ -1,5 +1,8 @@
 2013-06-27  Glenn Morris  <address@hidden>
 
+       * automated/python-tests.el (python-tests-with-temp-file):
+       Clean up after ourself.
+
        * automated/undo-tests.el (undo-test3): Remove test that seems to
        do nothing that the previous one doesn't, except leave a tempfile.
 

=== modified file 'test/automated/python-tests.el'
--- a/test/automated/python-tests.el    2013-04-19 02:31:09 +0000
+++ b/test/automated/python-tests.el    2013-06-27 05:46:51 +0000
@@ -39,7 +39,8 @@
 BODY is code to be executed within the temp buffer.  Point is
 always located at the beginning of buffer."
   (declare (indent 1) (debug t))
-  `(let* ((temp-file (concat (make-temp-file "python-tests") ".py"))
+  ;; temp-file never actually used for anything?
+  `(let* ((temp-file (make-temp-file "python-tests" nil ".py"))
           (buffer (find-file-noselect temp-file)))
      (unwind-protect
          (with-current-buffer buffer
@@ -47,7 +48,8 @@
            (insert ,contents)
            (goto-char (point-min))
            ,@body)
-       (and buffer (kill-buffer buffer)))))
+       (and buffer (kill-buffer buffer))
+       (delete-file temp-file))))
 
 (defun python-tests-look-at (string &optional num restore-point)
   "Move point at beginning of STRING in the current buffer.


reply via email to

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