From a96e10e8402d204d93463b9e6cf7e7f89f10e14b Mon Sep 17 00:00:00 2001 From: Austin Siew <17107540+Aquafina-water-bottle@users.noreply.github.com> Date: Wed, 28 Dec 2022 18:54:22 -0700 Subject: [PATCH] made the test more precise by checking the anki version --- tests/test_models.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_models.py b/tests/test_models.py index 801d900..bf8aa97 100755 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -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", ""]