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

test for the width and height attributes inside the image in the output #601

Merged
merged 1 commit into from
Jun 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion nbconvert/exporters/tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ def test_png_metadata(self):
"""
(output, resources) = HTMLExporter(template_file='basic').from_filename(
self._get_notebook(nb_name="pngmetadata.ipynb"))
assert len(output) > 0
check_for_png = re.compile(r'<img src="[^"]*?"([^>]*?)>')
result = check_for_png.search(output)
attr_string = result.group(1)
assert 'width' in attr_string
assert 'height' in attr_string

def test_javascript_output(self):
nb = v4.new_notebook(
Expand Down