From 832c7326af8660e900988807ee2a1890cf24e67b Mon Sep 17 00:00:00 2001 From: Adam Jakab Date: Mon, 2 Mar 2020 13:03:18 +0100 Subject: [PATCH] corrected test to account for `year` and `disctotal` field now being treated as `types.INTEGER` --- test/test_autotag.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test_autotag.py b/test/test_autotag.py index 28b7fd209..5ab3c4b49 100644 --- a/test/test_autotag.py +++ b/test/test_autotag.py @@ -21,6 +21,8 @@ import re import copy import unittest +from beets.dbcore.types import Integer, PaddedInt + from test import _common from beets import autotag from beets.autotag import match @@ -91,7 +93,10 @@ class PluralityTest(_common.TestCase): for i in range(5)] likelies, _ = match.current_metadata(items) for f in fields: - self.assertEqual(likelies[f], '%s_1' % f) + if type(items[0]._fields[f]) in (Integer, PaddedInt): + self.assertEqual(likelies[f], 0) + else: + self.assertEqual(likelies[f], '%s_1' % f) def _make_item(title, track, artist=u'some artist'):