mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 09:01:40 -05:00
Functional tests that handle redirects.
This commit is contained in:
parent
a4f9128182
commit
ed633b1fd7
2 changed files with 12 additions and 8 deletions
|
@ -42,13 +42,14 @@ Make MAX-COUNT larger \(default 50) to wait longer before timeout."
|
||||||
(kill-buffer (ein:notebooklist-get-buffer url-or-port))
|
(kill-buffer (ein:notebooklist-get-buffer url-or-port))
|
||||||
(when path
|
(when path
|
||||||
(setq notebook-name (format "%s/%s" path notebook-name)))
|
(setq notebook-name (format "%s/%s" path notebook-name)))
|
||||||
(with-current-buffer (ein:notebooklist-open url-or-port path)
|
(let ((content (ein:notebooklist-open url-or-port path t)))
|
||||||
(sleep-for 1.0) ;; Because some computers are too fast???
|
(sit-for 1.0) ;; Because some computers are too fast???
|
||||||
(ein:testing-wait-until "ein:notebooklist-open" (lambda () ein:%notebooklist%))
|
(ein:testing-wait-until "ein:notebooklist-open" (lambda () (ein:$content-url-or-port content)))
|
||||||
(prog1
|
(with-current-buffer (ein:notebooklist-get-buffer (ein:$content-url-or-port content))
|
||||||
(ignore-errors
|
(prog1
|
||||||
(ein:notebooklist-open-notebook-by-name notebook-name url-or-port))
|
(ignore-errors
|
||||||
(ein:log 'debug "TESTING-GET-NOTEBOOK-BY-NAME end"))))
|
(ein:notebooklist-open-notebook-by-name notebook-name (ein:$content-url-or-port content)))
|
||||||
|
(ein:log 'debug "TESTING-GET-NOTEBOOK-BY-NAME end")))))
|
||||||
|
|
||||||
(defun ein:testing-get-untitled0-or-create (url-or-port &optional path)
|
(defun ein:testing-get-untitled0-or-create (url-or-port &optional path)
|
||||||
(unless path (setq path ""))
|
(unless path (setq path ""))
|
||||||
|
|
|
@ -14,7 +14,10 @@ EIN_ROOT = os.path.normpath(
|
||||||
os.path.join(os.path.dirname(__file__), os.path.pardir))
|
os.path.join(os.path.dirname(__file__), os.path.pardir))
|
||||||
|
|
||||||
def cask_load_path():
|
def cask_load_path():
|
||||||
path = check_output(['cask','load-path'])
|
try:
|
||||||
|
path = check_output(['cask','load-path'])
|
||||||
|
except WindowsError:
|
||||||
|
path = check_output(['C:/Users/mille/.cask/bin/cask.bat', 'load-path'])
|
||||||
|
|
||||||
return path.decode()
|
return path.decode()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue