Skip to content

Commit

Permalink
Add test for issue 121
Browse files Browse the repository at this point in the history
I was unable to reproduce the issue with this test; the test passes
without any change to the code. So either the test is missing something
or the bug report is incorrect.

See #121
  • Loading branch information
kerrickstaley committed Nov 26, 2023
1 parent a58275b commit 0185006
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,18 @@ def test_suppress_warnings(recwarn):
my_note.write_to_db(mock.MagicMock(), mock.MagicMock(), mock.MagicMock(), itertools.count(int(time.time() * 1000)))


# https://github.com/kerrickstaley/genanki/issues/121
def test_does_not_warn_on_html_tags_in_guid():
my_note = genanki.Note(
model=genanki.BASIC_MODEL,
fields=['Capital of Iowa', 'Des Moines'],
guid='Gt<p8{N2>Z')

with warnings.catch_warnings():
warnings.simplefilter('error')
my_note.write_to_db(mock.MagicMock(), mock.MagicMock(), mock.MagicMock(), itertools.count(int(time.time() * 1000)))


def test_furigana_field():
# Fields like {{furigana:Reading}} are supported by the Japanese Support plugin:
# https://ankiweb.net/shared/info/3918629684
Expand Down

0 comments on commit 0185006

Please sign in to comment.