Skip to content

Commit

Permalink
Fix PytestRemovedIn8Warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrickstaley committed Nov 26, 2023
1 parent d04690e commit a0ab9a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ def test_suppress_warnings(recwarn):
model=my_model,
fields=['Capital of <$> Argentina', 'Buenos Aires'])

with pytest.warns(None) as warn_recorder:
# https://stackoverflow.com/a/45671804
with warnings.catch_warnings():
warnings.simplefilter('error')
warnings.filterwarnings('ignore', message='^Field contained the following invalid HTML tags', module='genanki')
my_note.write_to_db(mock.MagicMock(), mock.MagicMock(), mock.MagicMock(), itertools.count(int(time.time() * 1000)))

assert not warn_recorder


def test_furigana_field():
# Fields like {{furigana:Reading}} are supported by the Japanese Support plugin:
Expand Down

0 comments on commit a0ab9a9

Please sign in to comment.