made the test more precise by checking the anki version

This commit is contained in:
Austin Siew 2022-12-28 18:54:22 -07:00
parent 69baea296a
commit a96e10e840

View File

@ -1,4 +1,5 @@
from conftest import ac
from plugin import anki_version
def test_modelNames(setup):
@ -234,7 +235,9 @@ class TestModelFieldNames:
result = ac.modelFieldDescriptions(modelName="test_model")
if set_desc:
assert result == ["test description", ""]
else:
if anki_version < (2, 1, 50):
assert not set_desc
assert result == ["", ""]
else:
assert set_desc
assert result == ["test description", ""]