Commit graph

53 commits

Author SHA1 Message Date
John Miller
f64ff2ba57 func-test: Wrap call to start server with condition-case.
Also fix typo in README.rst.
2017-10-23 12:09:15 -05:00
Benda Xu
adce9b3b24 execute and debug notebooklist-open early. 2017-10-21 22:28:17 +09:00
Benda Xu
aa907826c0 tests/func-test.el: tests should be executed in a specific order.
ERT by default uses the lexical order.
2017-10-21 22:28:03 +09:00
Benda Xu
4795debbc8 tests/func-test.el: no need to kill notebook list buffer.
It is reliable now.
2017-10-21 22:27:04 +09:00
Benda Xu
21ba5f45ac tests/func-test.el: look for URL and output captured token.
Some environment can be slow so that even if "The Jupyter Notebook is
  running" appears, the notebook URL with token is not available.

  Test exactly for the URL.
2017-10-21 22:19:38 +09:00
Benda Xu
77fa27cc08 tests/func-test.el: path nil is not equivalent to "".
revert to the original design.
2017-09-30 21:42:26 +09:00
Benda Xu
7c05039752 tests/func-test.el: close jupyter server after tests. 2017-09-30 21:41:15 +09:00
Benda Xu
5e1f3ed665 tests/func-test.el: jupyter notebook could be started without token.
Wait for the message indicating the server has been started.
2017-09-30 21:19:16 +09:00
Benda Xu
52403097f0 tests/func-test.el: wait for the notebooklist buffer to appear. 2017-09-30 21:18:38 +09:00
Benda Xu
822ba97023 tests/func-test.el: pass kernelspec as a real ein:$kernelspec.
A simple pair does not work.
2017-09-30 21:17:09 +09:00
Benda Xu
afedb014ca tests/func-test.el: revert back to tkf's code.
cl-find does not work here.
2017-09-30 21:15:46 +09:00
John Miller
c78711a7c4 Back to eieio
It seems there are enough people out there still on Emacs 24 to warrant undoing
some of my recent moves away from eieio to cl-generic. For the near future I
will try to keep any changes that are incompatible with Emacs 24 to a
development branch. There is still probably plenty of opportunity to make the
code more future-proof for an eventual move away from eieio (I'm looking at you
oref and sref...)
2017-07-12 14:38:04 -05:00
John Miller
aebdbc1eb8 ein-cell: Fix saving images in worksheets.
Images weren't being save to json in the way they should have. Mostly had to do
with how the attirbutes were being ordered. This is still, unfortunately, a
nasty bit code but it still seems to work.
2017-06-30 21:41:16 -05:00
John Miller
39f5d329f1 Functional tests start jupyter using ein:jupyter-server-start
This reduces some of the complexity in testein.py, but unfortunately running
tests is still unreliable. Running batchwise tests don't work at all in Windows,
and running from inside emacs tests often need to be run multiple times before
they pass.

The worst offender is the delete notebook test, which will pass on usually only
1 out of 3 tries.

Testing seems to have revealed a couple bugs, so win??
2017-04-07 08:18:41 -05:00
John Miller
ed633b1fd7 Functional tests that handle redirects. 2017-02-14 21:01:25 -06:00
John Miller
256b14a49f Make synchronous comm a user configurable parameter.
EIN can communicate with the jupyter contents API synchronously or
asyncronously, with the default behavior the latter. For a time it has
been possible to force synchronous from the code, but now I have made
that a user-configurable parameter (see `ein:force-sync`).
2016-10-05 11:39:54 -05:00
John Miller
85744a78bd Fix delete test, travis config tweaking cont.
Make delete test slightly less complicated, but hopefully still as
test-y. More tweaking to travis config.
2016-10-03 11:36:27 -05:00
John Miller
cf70c7ecd9 Cleaning up testing
Trying to keep up with jupyter..
2016-09-30 13:24:28 -05:00
John Miller
e10bc60f30 Tweaks to functional testing and travis config.
Also adding environment definition for testing jupyter.
2016-05-17 16:22:05 -05:00
John Miller
4eae3ce446 Clean up warnings in func-test.el 2015-02-03 19:12:25 -06:00
millejoh
84f478aed6 Improving ipython 3 support in testein.py. Lots of fixes for notebook tests to
properly test nbformat 3 notebooks.
2015-02-02 13:20:24 -06:00
John Miller
fe7dc935c5 Fixing notebooklist-new-notebook
IPython 2.x+ has a JSON response when creating a new notebook. We detect
this and correctly parse the info so we can open a buffer with the newly
created notebook.

Also more updating of test code.
2014-12-04 13:52:36 -06:00
Takafumi Arakaki
0d7cf29002 Run test with curl and url-retrieve 2013-01-16 21:01:00 +01:00
Takafumi Arakaki
3966a6c22f Fix ein:testing-delete-notebook-by-name
ein:notebooklist-reload, which is called from success
callback of ein:notebooklist-delete-notebook, needs to
access ein:%notebooklist%.  However it was set to nil
in ein:testing-delete-notebook-by-name just after the
delete button is "clicked".  This was meant to detect
if the delete process is finished, but was not working.
To solve this problem, I add ein:notebooklist-after-open-hook
and use it to detect end of the delete process.
2012-12-30 15:59:16 +01:00
Takafumi Arakaki
ef1eb9a8dd Do not truncate messages buffer when testing 2012-09-18 23:55:22 +02:00
Takafumi Arakaki
7de8bec6ea Skip checking SVG in func-test.el when not available 2012-09-18 16:17:43 +02:00
Takafumi Arakaki
c264e5c345 Better functional test for image output 2012-09-18 16:17:43 +02:00
Takafumi Arakaki
132be8da1d Drop dependency on matplotlib from func-test.el 2012-09-18 16:17:43 +02:00
Takafumi Arakaki
a4df395d9a Use callback when creating notebook 2012-09-18 16:17:42 +02:00
Takafumi Arakaki
0622f3e563 Remove tests/setup-server.el 2012-09-18 16:17:42 +02:00
Takafumi Arakaki
4f53d85ed3 %s/eintest:/ein:testing-/g in func-test.el 2012-09-18 16:17:42 +02:00
Takafumi Arakaki
0fad9548cd Merge branch 'worksheet'
Conflicts:
	tests/test-ein-shared-output.el

Add worksheet module to start worksheet support.  There is no
multiple worksheet support yet.  I am merging this since this
branch is as usable as the master branch.

Also, there are several bug fixes and improvements unrelated to
worksheet feature.
2012-08-23 22:48:17 +02:00
Takafumi Arakaki
a1a2185a9e Improve debugging messages in func-test.el 2012-08-23 22:00:52 +02:00
Takafumi Arakaki
6ea042867f Add more debugging messages in func-test.el 2012-08-23 21:17:19 +02:00
Takafumi Arakaki
dcad3c7158 Add debugging messages in func-test.el 2012-08-23 21:10:40 +02:00
Takafumi Arakaki
5ca22029db Dump test log using ein-testing 2012-08-23 19:32:47 +02:00
Takafumi Arakaki
a769aa3b03 Fix test ein:notebook-execute-current-cell-question for Emacs 23
At the time (ein:$notebook-pager ein:%notebook%) is executed, the
current buffer is changed to the pager buffer.  As `notebook' is
already let-bound to ein:$notebook instance, it is better to use
this than the buffer local ein:%notebook%.
2012-08-23 17:39:06 +02:00
Takafumi Arakaki
37cacec4e9 Fix compiler warnings in func-test.el
%s/(ein:notebook-insert-cell-below-command)/(call-interactively #'ein:worksheet-insert-cell-below)/g
%s/(ein:notebook-execute-current-cell)/(call-interactively #'ein:worksheet-execute-cell)/g
2012-08-20 10:43:44 +02:00
Takafumi Arakaki
3b13458d0d Fix functional test 2012-08-19 21:48:33 +02:00
Takafumi Arakaki
41806c396e Use ein:%notebook% and ein:%notebooklist% in func-test.el
%s/\_<ein:\(notebooklist\)\_>/ein:%\1%/g
%s/\_<ein:\(notebook\)\_>/ein:%\1%/g
2012-08-19 00:24:14 +02:00
Takafumi Arakaki
c104a0b19d Rename ein:kernel-ready-p to ein:kernel-live-p 2012-07-19 00:37:30 +02:00
Takafumi Arakaki
fa00a57b80 Use ein:notebooklist-open-notebook-by-name in func-test.el 2012-07-05 00:14:52 +02:00
Takafumi Arakaki
4a50ebc71e Tweak eintest:delete-untitled0
Avoid ert making huge (and useless) test report.
2012-06-13 01:23:19 +02:00
Takafumi Arakaki
0bf5308699 Fix eintest:get-notebook-by-name
Note that this fix is not nothing to do with the changes in ein-query.
2012-06-13 01:19:49 +02:00
Takafumi Arakaki
b37dbaeeeb Add eintest:delete-untitled0 2012-05-26 22:39:39 +02:00
Takafumi Arakaki
b9e056d8f7 Fix eintest:get-untitled0-or-create 2012-05-26 22:37:26 +02:00
Takafumi Arakaki
d2801ebcfc Add test: ein:notebook-execute-current-cell-question 2012-05-23 02:21:45 +02:00
Takafumi Arakaki
d538d7673e Add new test: ein:notebook-request-help 2012-05-23 02:03:23 +02:00
Takafumi Arakaki
82530976f1 Add timeout error to eintest:wait-until 2012-05-17 21:25:03 +02:00
Takafumi Arakaki
dff4cf730c Add more tests: ein:notebook-execute-current-cell-* 2012-05-17 21:05:19 +02:00