Skip to content

Commit e1793c0

Browse files
committed
debug
1 parent 2d3b7ce commit e1793c0

File tree

2 files changed

+36
-33
lines changed

2 files changed

+36
-33
lines changed

jupyter-rest-api.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ If the maximum number of redirects are reached a
172172
(json-false nil)
173173
(resp (when (and (equal url-http-content-type "application/json")
174174
(not (eobp)))
175+
(when jupyter--debug
176+
(message "Jupyter: JSON Received: %S" (buffer-substring (point) (point-max))))
175177
(json-read))))
176178
(cond
177179
((>= url-http-response-status 400)

test/jupyter-tramp-test.el

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -199,39 +199,40 @@
199199

200200
(ert-deftest jupyter-delete-directory ()
201201
:tags '(tramp server)
202-
(jupyter-test-at-temporary-directory
203-
(let* ((tfile (make-temp-file "delete-directory"))
204-
(tdir (make-temp-file "delete-directory" 'directory))
205-
(jpyfile (expand-file-name (file-name-nondirectory tfile) "/jpy::/"))
206-
(jpydir (expand-file-name (file-name-nondirectory tdir) "/jpy::/")))
207-
(should (file-exists-p tfile))
208-
(should (file-exists-p jpyfile))
209-
(should (file-exists-p tdir))
210-
(should (file-exists-p jpydir))
211-
(unwind-protect
212-
(progn
213-
(ert-info ("Error when attempting to delete a file")
214-
(should-error (delete-directory jpyfile)))
215-
(ert-info ("Delete a directory")
216-
(let ((jpyfile2 (expand-file-name "foobar" jpydir)))
217-
(write-region "xxx" nil jpyfile2)
218-
(unwind-protect
219-
(progn
220-
(ert-info ("Error when directory contains files")
221-
(should-error (delete-directory jpydir)))
222-
(ert-info ("Unless recursive is specifed")
223-
(delete-directory jpydir t)
224-
(should-not (file-exists-p jpyfile2))
225-
(should-not (file-directory-p tdir))))
226-
(when (file-exists-p jpyfile2)
227-
(delete-file jpyfile2))))
228-
(should-not (file-exists-p tdir))
229-
(ert-info ("Ensure cache is cleared")
230-
(should-not (file-exists-p jpydir)))))
231-
(when (file-exists-p tfile)
232-
(delete-file tfile))
233-
(when (file-exists-p tdir)
234-
(delete-directory tdir t))))))
202+
(let ((jupyter--debug t))
203+
(jupyter-test-at-temporary-directory
204+
(let* ((tfile (make-temp-file "delete-directory"))
205+
(tdir (make-temp-file "delete-directory" 'directory))
206+
(jpyfile (expand-file-name (file-name-nondirectory tfile) "/jpy::/"))
207+
(jpydir (expand-file-name (file-name-nondirectory tdir) "/jpy::/")))
208+
(should (file-exists-p tfile))
209+
(should (file-exists-p jpyfile))
210+
(should (file-exists-p tdir))
211+
(should (file-exists-p jpydir))
212+
(unwind-protect
213+
(progn
214+
(ert-info ("Error when attempting to delete a file")
215+
(should-error (delete-directory jpyfile)))
216+
(ert-info ("Delete a directory")
217+
(let ((jpyfile2 (expand-file-name "foobar" jpydir)))
218+
(write-region "xxx" nil jpyfile2)
219+
(unwind-protect
220+
(progn
221+
(ert-info ("Error when directory contains files")
222+
(should-error (delete-directory jpydir)))
223+
(ert-info ("Unless recursive is specifed")
224+
(delete-directory jpydir t)
225+
(should-not (file-exists-p jpyfile2))
226+
(should-not (file-directory-p tdir))))
227+
(when (file-exists-p jpyfile2)
228+
(delete-file jpyfile2))))
229+
(should-not (file-exists-p tdir))
230+
(ert-info ("Ensure cache is cleared")
231+
(should-not (file-exists-p jpydir)))))
232+
(when (file-exists-p tfile)
233+
(delete-file tfile))
234+
(when (file-exists-p tdir)
235+
(delete-directory tdir t)))))))
235236

236237
(ert-deftest jupyter-tramp-file-attributes ()
237238
:tags '(tramp server)

0 commit comments

Comments
 (0)