<feed xmlns='http://www.w3.org/2005/Atom'>
<title>elpa.git/testing/lisp/test-ob-python.el, branch scratch/org</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/'/>
<entry>
<title>testing/lisp/*.el: Fix second arg to `signal`</title>
<updated>2024-05-19T21:20:34+00:00</updated>
<author>
<name>Stefan Monnier</name>
<email>monnier@iro.umontreal.ca</email>
</author>
<published>2024-05-19T21:19:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=dc62e4a1f943f7ca49b3075d9160dc19856fae7b'/>
<id>dc62e4a1f943f7ca49b3075d9160dc19856fae7b</id>
<content type='text'>
The second argument to `signal` should be a list, as explained in its
docstring.  Fix `missing-test-dependency` signals accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The second argument to `signal` should be a list, as explained in its
docstring.  Fix `missing-test-dependency` signals accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>ob-python: Test and improve robustness for externally started python</title>
<updated>2023-12-29T15:46:49+00:00</updated>
<author>
<name>Jack Kamm</name>
<email>jackkamm@gmail.com</email>
</author>
<published>2023-12-29T15:39:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=d0d838b02e44a40adca14d6eae39fd4c364730da'/>
<id>d0d838b02e44a40adca14d6eae39fd4c364730da</id>
<content type='text'>
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Wait
for first prompt for pre-existing python processes.  Document behavior
for pre-existing python processes.
(org-babel-python-initiate-session): Document behavior for
pre-existing python processes.
*
testing/lisp/test-ob-python.el (test-ob-python/session-with-existing-inferior-python):
New test for working with existing python processes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Wait
for first prompt for pre-existing python processes.  Document behavior
for pre-existing python processes.
(org-babel-python-initiate-session): Document behavior for
pre-existing python processes.
*
testing/lisp/test-ob-python.el (test-ob-python/session-with-existing-inferior-python):
New test for working with existing python processes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix obsolete `sleep-for' usage</title>
<updated>2023-10-21T13:08:25+00:00</updated>
<author>
<name>Gerard Vermeulen</name>
<email>gerard.vermeulen@posteo.net</email>
</author>
<published>2023-10-21T09:50:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=14944451164ec1259cf2c730c9aadad3d0525ec4'/>
<id>14944451164ec1259cf2c730c9aadad3d0525ec4</id>
<content type='text'>
* lisp/ob-lua.el (org-babel-lua-evaluate-session):
* lisp/ob-python.el (org-babel-python-initiate-session-by-key):
(org-babel-python-evaluate-session):
* testing/lisp/test-ob-R.el (ob-session-async-R-simple-session-async-value):
(ob-session-async-R-simple-session-async-output):
(ob-session-async-R-named-output):
(ob-session-async-R-named-value):
(ob-session-async-R-output-drawer):
(ob-session-async-R-value-drawer):
(ob-session-R-result-output):
* testing/lisp/test-ob-julia.el (test-ob-julia/async-simple-session-output):
(test-ob-julia/async-named-output):
(test-ob-julia/async-output-drawer):
* testing/lisp/test-ob-python.el (test-ob-python/async-simple-session-output):
(test-ob-python/async-named-output):
(test-ob-python/async-output-drawer): Replace deprecated two integer
argument `sleep-for' calls with one float `sleep-for' calls.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/ob-lua.el (org-babel-lua-evaluate-session):
* lisp/ob-python.el (org-babel-python-initiate-session-by-key):
(org-babel-python-evaluate-session):
* testing/lisp/test-ob-R.el (ob-session-async-R-simple-session-async-value):
(ob-session-async-R-simple-session-async-output):
(ob-session-async-R-named-output):
(ob-session-async-R-named-value):
(ob-session-async-R-output-drawer):
(ob-session-async-R-value-drawer):
(ob-session-R-result-output):
* testing/lisp/test-ob-julia.el (test-ob-julia/async-simple-session-output):
(test-ob-julia/async-named-output):
(test-ob-julia/async-output-drawer):
* testing/lisp/test-ob-python.el (test-ob-python/async-simple-session-output):
(test-ob-python/async-named-output):
(test-ob-python/async-output-drawer): Replace deprecated two integer
argument `sleep-for' calls with one float `sleep-for' calls.
</pre>
</div>
</content>
</entry>
<entry>
<title>test-ob-python: Unit test for restarting session</title>
<updated>2023-08-31T04:48:36+00:00</updated>
<author>
<name>Jack Kamm</name>
<email>jackkamm@gmail.com</email>
</author>
<published>2023-08-31T04:45:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=8000b1120935bd7a9cc56eb6a65c90bc021f42f3'/>
<id>8000b1120935bd7a9cc56eb6a65c90bc021f42f3</id>
<content type='text'>
See: https://list.orgmode.org/87ttsnh5bx.fsf@localhost/T/#t

* testing/lisp/test-ob-python.el (test-ob-python/session-restart): New
test for restarting ob-python session process.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See: https://list.orgmode.org/87ttsnh5bx.fsf@localhost/T/#t

* testing/lisp/test-ob-python.el (test-ob-python/session-restart): New
test for restarting ob-python session process.
</pre>
</div>
</content>
</entry>
<entry>
<title>ob-python: Fix async evaluation</title>
<updated>2023-07-14T00:24:41+00:00</updated>
<author>
<name>Liu Hui</name>
<email>liuhui1610@gmail.com</email>
</author>
<published>2023-07-12T10:07:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=5e31dcdd9aa416513cd37c4fb6eff5f8b1cf5b17'/>
<id>5e31dcdd9aa416513cd37c4fb6eff5f8b1cf5b17</id>
<content type='text'>
* lisp/ob-python.el (org-babel-python-async-evaluate-session): Bind
`python-shell-buffer-name' inside the temp buffer.
* testing/lisp/test-ob-python.el (test-ob-python/async-local-python-shell):
Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/ob-python.el (org-babel-python-async-evaluate-session): Bind
`python-shell-buffer-name' inside the temp buffer.
* testing/lisp/test-ob-python.el (test-ob-python/async-local-python-shell):
Add test.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup! test-ob-python: Disable test failing on CI when using older Emacs</title>
<updated>2022-11-16T09:42:17+00:00</updated>
<author>
<name>Ihor Radchenko</name>
<email>yantar92@posteo.net</email>
</author>
<published>2022-11-16T09:42:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=fe67cebb3a51833e36ffd23a5c7c7ad2f85b7d76'/>
<id>fe67cebb3a51833e36ffd23a5c7c7ad2f85b7d76</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup! test-ob-python: Disable test failing on CI when using older Emacs</title>
<updated>2022-11-16T08:31:40+00:00</updated>
<author>
<name>Ihor Radchenko</name>
<email>yantar92@posteo.net</email>
</author>
<published>2022-11-16T08:31:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=a831c18baf6cc7f0865c327fe2b4019bd582a547'/>
<id>a831c18baf6cc7f0865c327fe2b4019bd582a547</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test-ob-python: Disable test failing on CI when using older Emacs</title>
<updated>2022-11-16T02:29:40+00:00</updated>
<author>
<name>Ihor Radchenko</name>
<email>yantar92@posteo.net</email>
</author>
<published>2022-11-16T02:26:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=d45a8962895618804409ae51bdc0607ec97e1ef7'/>
<id>d45a8962895618804409ae51bdc0607ec97e1ef7</id>
<content type='text'>
* testing/lisp/test-ob-python.el (test-ob-python/assign-underscore):
Skip the test when running Emacs &lt;28.  On older Emacs, python.el may
fail to load on slow machines, like during CI testing.

Link: https://lists.sr.ht/~bzg/org-build-failures/%3CCOCRNW71TUAP.L29E2AW6TQZ2%40cirno2%3E
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* testing/lisp/test-ob-python.el (test-ob-python/assign-underscore):
Skip the test when running Emacs &lt;28.  On older Emacs, python.el may
fail to load on slow machines, like during CI testing.

Link: https://lists.sr.ht/~bzg/org-build-failures/%3CCOCRNW71TUAP.L29E2AW6TQZ2%40cirno2%3E
</pre>
</div>
</content>
</entry>
<entry>
<title>test-ob-python: Refactor test failing on CI to provide better backtrace</title>
<updated>2022-11-15T07:04:08+00:00</updated>
<author>
<name>Ihor Radchenko</name>
<email>yantar92@posteo.net</email>
</author>
<published>2022-11-15T07:04:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=3ef0e3c33854311c5cec9c91b1f9ad36a119f7af'/>
<id>3ef0e3c33854311c5cec9c91b1f9ad36a119f7af</id>
<content type='text'>
* testing/lisp/test-ob-python.el (test-ob-python/assign-underscore):
Do not wrap code into `should' form as much as possible to avoid
truncated backtrace.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* testing/lisp/test-ob-python.el (test-ob-python/assign-underscore):
Do not wrap code into `should' form as much as possible to avoid
truncated backtrace.
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: Make all files use `lexical-binding`</title>
<updated>2022-09-15T11:17:19+00:00</updated>
<author>
<name>Stefan Monnier</name>
<email>monnier@iro.umontreal.ca</email>
</author>
<published>2022-09-14T21:21:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/elpa.git/commit/?id=1a5e3f931c9bbefaefafd4cdcc5f0dfcd1c97769'/>
<id>1a5e3f931c9bbefaefafd4cdcc5f0dfcd1c97769</id>
<content type='text'>
Mainly, add the corresponding cookie, but also add various `require`s
so that the compiler knows which vars should be trated as dynbound.
This does not fix all the warnings, but does try to eliminate
all those about "unused" variables.  For the variables truly unused,
the patch usually adds an underscore to their name to silence the warning.

Some of the fixes affect files which already used `lexical-binding`.
Not sure why the test worked before: maybe because the tests were run
without compiling them first (which could cause some of the
missing `require`d packages to be autoloaded before we got to the
problematic code, thus hiding the problem)?

I found some suspicious code, for which I added FIXMEs.

There are also a few changes to the main files.

* lisp/org-protocol.el (org-protocol-check-filename-for-protocol):
Don't call `server-edit` if it's not yet defined.  [ Needed to get
the tests to pass. ]

* lisp/ob-core.el (org-babel-temporary-directory)
(org-babel-temporary-stable-directory): Always define (and use nil
if we don't want to create a directory for it).  Simplify the code based
on the fact that (defvar V E) only evaluates E if V is not yet `boundp`.
(org-babel-temp-file, org-babel-temp-stable-file)
(org-babel-remove-temporary-directory)
(org-babel-remove-temporary-stable-directory): Adjust accordingly.

* lisp/org.el (org-log-beginning): Add FIXME.

* testing/org-test.el: Require `org` and `org-id`.
(org-id-locations-file): Don't `defconst` it.
(org-test-at-id, org-test-in-example-file, org-test-at-marker)
(org-test-with-temp-text, org-test-with-temp-text-in-file): Move edebug
specs into `declare` (and simplify them).
(org-test-with-tramp-remote-dir--worker): Declare dynbound tramp vars.
(org--compile-when): Fix quoting of `exp`.
(org-test-load): Tweak regexps.

* testing/org-batch-test-init.el: Tweak regexp, remove dead code and
add a FIXME about it.

* testing/lisp/test-ox.el: Require `ox` instead of
erroring out if it's not already loaded.  Also require `org-inlinetask`.
(org-test-with-parsed-data): Silence warnings when `info` is not used.
(test-org-export/bind-keyword): Add FIXME.

* testing/lisp/test-ox-publish.el: Require `org-test` and `ox-publish`.
(test-org-publish/resolve-external-link): Expose lambdas to
the compiler.  Remove unused var `ids`.
(test-org-publish/get-project-from-filename): Remove unused var `file`.

* testing/lisp/test-org.el: Require `org-macs`, `org`,
`org-inlinetask`, `org-refile`, and `org-agenda`.
(test-org/org-read-date): Declare `org-time-was-given` as dynbound.
(test-org/set-regexps-and-options): Add FIXME.

* testing/lisp/test-org-timer.el: Require `org-timer`.

* testing/lisp/test-org-table.el: Require `ox`.

* testing/lisp/test-org-protocol.el: Require `org-protocol` instead of
erroring out if it's not already loaded.  Also require `capture`, and
add missing `provide` statement.

* testing/lisp/test-org-pcomplete.el: Require `org`.

* testing/lisp/test-org-list.el: Require `org-list` and `org`.

* testing/lisp/test-org-lint.el: Require `org-footnote` and `org-lint`.

* testing/lisp/test-org-footnote.el: Require `org-footnote`.

* testing/lisp/test-org-element.el: Require `org-element` instead of
erroring out if it's not already loaded.  Also require `org` and
`org-inlinetask`.

* testing/lisp/test-org-duration.el: Require `org-duration`.

* testing/lisp/test-org-datetree.el: Require `org-datetree`.

* testing/lisp/test-org-colview.el: Require `org-colview`,
`org-duration`, and `org-inlinetask`.

* testing/lisp/test-org-clock.el: Require `org-duration` and `org-clock`.

* testing/lisp/test-org-archive.el: Require `org-archive`.

* testing/lisp/test-org-agenda.el
(test-org-agenda/bulk-custom-arg-func): Add FIXME.

* testing/lisp/test-ol.el: Require `ol` and `org-id`.
(test-org-link/store-link): Declare `org-store-link-props` and add FIXME.

* testing/lisp/test-oc.el (test-org-cite/export-capability): Add FIXME.

* testing/lisp/test-ob.el: Require `ob-core`, `org-src`, `ob-ref`,
and `org-table`.
(test-ob/eval-header-argument): Rename `foo` to `test-ob--foo` and
declare it as dynbound.
(test-ob/blocks-with-spaces, test-ob/specific-colnames): Add FIXME.
(test-ob/noweb-expansions-in-cache):
Declare `noweb-expansions-in-cache-var` as dynbound.

* testing/lisp/test-ob-tangle.el: Require `org` and `ob-tangle`.

* testing/lisp/test-ob-shell.el:
* testing/lisp/test-ob-python.el: Require `ob-core`.

* testing/lisp/test-ob-lob.el: Require `ob-lob`.
(temporary-value-for-test): Declare as dynbound.

* testing/lisp/test-ob-plantuml.el: Require `ob-plantuml` instead of
erroring out if it's not already loaded.
* testing/lisp/test-ob-lilypond.el: Require `ob-lilypond` instead of
erroring out if it's not already loaded.  Use `with-current-buffer`.

* testing/lisp/test-ob-julia.el: Require `ob-core`.

* testing/lisp/test-ob-java.el (org-babel-temporary-directory):
Remove dead code now that `org-babel-temporary-directory` is always bound.

* testing/lisp/test-ob-exp.el: Require `ob-exp`, `org-src`, and `org-test`.
(ob-exp/evaluate-all-executables-in-order):
Declare `*evaluation-collector*` as dynbound.

* testing/lisp/test-ob-emacs-lisp.el (ob-emacs-lisp/dynamic-lexical-edit)
(ob-emacs-lisp/dynamic-lexical-execute):
Rename dynbound var to `ob-emacs--x` and declare it as such.

* testing/lisp/test-ob-R.el: Require `ob-core`.
(ess-ask-for-ess-directory, ess-history-file): Declare vars.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mainly, add the corresponding cookie, but also add various `require`s
so that the compiler knows which vars should be trated as dynbound.
This does not fix all the warnings, but does try to eliminate
all those about "unused" variables.  For the variables truly unused,
the patch usually adds an underscore to their name to silence the warning.

Some of the fixes affect files which already used `lexical-binding`.
Not sure why the test worked before: maybe because the tests were run
without compiling them first (which could cause some of the
missing `require`d packages to be autoloaded before we got to the
problematic code, thus hiding the problem)?

I found some suspicious code, for which I added FIXMEs.

There are also a few changes to the main files.

* lisp/org-protocol.el (org-protocol-check-filename-for-protocol):
Don't call `server-edit` if it's not yet defined.  [ Needed to get
the tests to pass. ]

* lisp/ob-core.el (org-babel-temporary-directory)
(org-babel-temporary-stable-directory): Always define (and use nil
if we don't want to create a directory for it).  Simplify the code based
on the fact that (defvar V E) only evaluates E if V is not yet `boundp`.
(org-babel-temp-file, org-babel-temp-stable-file)
(org-babel-remove-temporary-directory)
(org-babel-remove-temporary-stable-directory): Adjust accordingly.

* lisp/org.el (org-log-beginning): Add FIXME.

* testing/org-test.el: Require `org` and `org-id`.
(org-id-locations-file): Don't `defconst` it.
(org-test-at-id, org-test-in-example-file, org-test-at-marker)
(org-test-with-temp-text, org-test-with-temp-text-in-file): Move edebug
specs into `declare` (and simplify them).
(org-test-with-tramp-remote-dir--worker): Declare dynbound tramp vars.
(org--compile-when): Fix quoting of `exp`.
(org-test-load): Tweak regexps.

* testing/org-batch-test-init.el: Tweak regexp, remove dead code and
add a FIXME about it.

* testing/lisp/test-ox.el: Require `ox` instead of
erroring out if it's not already loaded.  Also require `org-inlinetask`.
(org-test-with-parsed-data): Silence warnings when `info` is not used.
(test-org-export/bind-keyword): Add FIXME.

* testing/lisp/test-ox-publish.el: Require `org-test` and `ox-publish`.
(test-org-publish/resolve-external-link): Expose lambdas to
the compiler.  Remove unused var `ids`.
(test-org-publish/get-project-from-filename): Remove unused var `file`.

* testing/lisp/test-org.el: Require `org-macs`, `org`,
`org-inlinetask`, `org-refile`, and `org-agenda`.
(test-org/org-read-date): Declare `org-time-was-given` as dynbound.
(test-org/set-regexps-and-options): Add FIXME.

* testing/lisp/test-org-timer.el: Require `org-timer`.

* testing/lisp/test-org-table.el: Require `ox`.

* testing/lisp/test-org-protocol.el: Require `org-protocol` instead of
erroring out if it's not already loaded.  Also require `capture`, and
add missing `provide` statement.

* testing/lisp/test-org-pcomplete.el: Require `org`.

* testing/lisp/test-org-list.el: Require `org-list` and `org`.

* testing/lisp/test-org-lint.el: Require `org-footnote` and `org-lint`.

* testing/lisp/test-org-footnote.el: Require `org-footnote`.

* testing/lisp/test-org-element.el: Require `org-element` instead of
erroring out if it's not already loaded.  Also require `org` and
`org-inlinetask`.

* testing/lisp/test-org-duration.el: Require `org-duration`.

* testing/lisp/test-org-datetree.el: Require `org-datetree`.

* testing/lisp/test-org-colview.el: Require `org-colview`,
`org-duration`, and `org-inlinetask`.

* testing/lisp/test-org-clock.el: Require `org-duration` and `org-clock`.

* testing/lisp/test-org-archive.el: Require `org-archive`.

* testing/lisp/test-org-agenda.el
(test-org-agenda/bulk-custom-arg-func): Add FIXME.

* testing/lisp/test-ol.el: Require `ol` and `org-id`.
(test-org-link/store-link): Declare `org-store-link-props` and add FIXME.

* testing/lisp/test-oc.el (test-org-cite/export-capability): Add FIXME.

* testing/lisp/test-ob.el: Require `ob-core`, `org-src`, `ob-ref`,
and `org-table`.
(test-ob/eval-header-argument): Rename `foo` to `test-ob--foo` and
declare it as dynbound.
(test-ob/blocks-with-spaces, test-ob/specific-colnames): Add FIXME.
(test-ob/noweb-expansions-in-cache):
Declare `noweb-expansions-in-cache-var` as dynbound.

* testing/lisp/test-ob-tangle.el: Require `org` and `ob-tangle`.

* testing/lisp/test-ob-shell.el:
* testing/lisp/test-ob-python.el: Require `ob-core`.

* testing/lisp/test-ob-lob.el: Require `ob-lob`.
(temporary-value-for-test): Declare as dynbound.

* testing/lisp/test-ob-plantuml.el: Require `ob-plantuml` instead of
erroring out if it's not already loaded.
* testing/lisp/test-ob-lilypond.el: Require `ob-lilypond` instead of
erroring out if it's not already loaded.  Use `with-current-buffer`.

* testing/lisp/test-ob-julia.el: Require `ob-core`.

* testing/lisp/test-ob-java.el (org-babel-temporary-directory):
Remove dead code now that `org-babel-temporary-directory` is always bound.

* testing/lisp/test-ob-exp.el: Require `ob-exp`, `org-src`, and `org-test`.
(ob-exp/evaluate-all-executables-in-order):
Declare `*evaluation-collector*` as dynbound.

* testing/lisp/test-ob-emacs-lisp.el (ob-emacs-lisp/dynamic-lexical-edit)
(ob-emacs-lisp/dynamic-lexical-execute):
Rename dynbound var to `ob-emacs--x` and declare it as such.

* testing/lisp/test-ob-R.el: Require `ob-core`.
(ess-ask-for-ess-directory, ess-history-file): Declare vars.
</pre>
</div>
</content>
</entry>
</feed>
