Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tikz functional test #135

Merged
merged 3 commits into from
Dec 15, 2019
Merged

Conversation

llimeht
Copy link
Contributor

@llimeht llimeht commented Dec 12, 2019

The current functional test of the tikz handler needs a few fixups:

  • it does not check that plastex ran correctly
  • it requires additional tools to be installed
  • it cannot be run in place (only after installation)

Calling 'plastex' as a subprocess relies on it being installed and so prevents
in-place testing. There is also a chance of accidentally switching
interpreters when going via the commandline, so permitting the test harness to
set this is important.
The success of the call to 'plastex' needs to be checked to catch test
failures as early as possible.
tikz testing requires various packages to be installed
@PatrickMassot
Copy link
Contributor

I don't really understand what you are achieving here. How do you test that the LaTeX packages you install did anything?

@llimeht
Copy link
Contributor Author

llimeht commented Dec 14, 2019

The test fails without those packages being installed. From https://travis-ci.org/llimeht/plastex/jobs/624911446

...
/bin/sh: 1: dvipng: not found
/bin/sh: 1: dvi2bitmap: not found
/bin/sh: 1: gs: not found
/bin/sh: 1: gs: not found
/bin/sh: 1: cgpdfpng: not found
...
FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex'

and then plastex exits 1.

Note that in the second of the three commits, call() is changed to check_call() so that if running plastex fails then the test fails properly.

@PatrickMassot PatrickMassot merged commit 2b0791b into plastex:master Dec 15, 2019
@llimeht llimeht deleted the tmp/test-interpreter branch December 15, 2019 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants