From 1483a864719cedabc0d6c6bcd98e0b2d9d3ce0c1 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 25 Jan 2015 17:06:54 +0000 Subject: Use prefix to generate IDs --- tests/mammoth_tests.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/mammoth_tests.py') diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py index 79ce50c..c5f2557 100644 --- a/tests/mammoth_tests.py +++ b/tests/mammoth_tests.py @@ -61,13 +61,13 @@ def word_tables_are_converted_to_html_tables(): def footnotes_are_appended_to_text(): # TODO: don't duplicate footnotes with multiple references expected_html = ('

Ouch' + - '[1].' + - '[2]

' + - '
  1. A tachyon walks into a bar. ↑

  2. ' + - '
  3. Fin. ↑

') + '[1].' + + '[2]

' + + '
  1. A tachyon walks into a bar. ↑

  2. ' + + '
  3. Fin. ↑

') with open(test_path("footnotes.docx"), "rb") as fileobj: - result = mammoth.convert_to_html(fileobj=fileobj, generate_uniquifier=lambda: 42) + result = mammoth.convert_to_html(fileobj=fileobj, id_prefix="doc-42") assert_equal([], result.messages) assert_equal(expected_html, result.value) @@ -75,13 +75,13 @@ def footnotes_are_appended_to_text(): @istest def endnotes_are_appended_to_text(): expected_html = ('

Ouch' + - '[1].' + - '[2]

' + - '
  1. A tachyon walks into a bar. ↑

  2. ' + - '
  3. Fin. ↑

') + '[1].' + + '[2]

' + + '
  1. A tachyon walks into a bar. ↑

  2. ' + + '
  3. Fin. ↑

') with open(test_path("endnotes.docx"), "rb") as fileobj: - result = mammoth.convert_to_html(fileobj=fileobj, generate_uniquifier=lambda: 42) + result = mammoth.convert_to_html(fileobj=fileobj, id_prefix="doc-42") assert_equal([], result.messages) assert_equal(expected_html, result.value) -- cgit v1.2.3