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

Embed comparison plots in Dokuwiki Report. #588

Merged
merged 12 commits into from
Jun 14, 2016

Conversation

kdexd
Copy link

@kdexd kdexd commented Jun 10, 2016

This PR introduces a mechanism which adds comparison plot generated by TestW7.plot_spectrum() method, to the dokuwiki report. The image is saved by plot_spectrum in a session wide temporary directory, and this file path is provided to the DokuReport class by the corresponding test method (here test_spectrum).

Reading the image and base64 encoding is done within the class and it is uploaded at an appropriate place in the plot.

Karan Desai added 12 commits June 9, 2016 13:05
- Added pytest-html in requirements as a dependency.
- This tempfile will get deleted upon closing and
  no longer needs os.unlink while execution of
  pytest_nconfigure hook.
- Override base class' pytest_terminal_summary method
  and display message according to success / failure
  of upload of report.

- Try/ except methods are introduced wherever there is
  an attempt to interact with dokuwiki is made.
- tempfile is no longer used to write the report and upload
  it to dokuwiki.

- _generate_report returns a string which is accepted by
  _save_report to upload it on Dokuwiki.
- Instead of doing 'if dokuwiki is not None', a try-except
  block is used to catch a 'TypeError'.
- Report content is requested from dokuwiki using pages.get
  method and report upload is said to be successful if a non
  empty string is received.
@kdexd kdexd force-pushed the embed-plots-in-dokureport branch from 2f4d86b to 7b6135d Compare June 14, 2016 07:40
@yeganer yeganer merged commit 7b6135d into tardis-sn:master Jun 14, 2016
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.

2 participants