From bbac4ba109d9fd7fe83bec5816c0cee40b6beacf Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 16 Sep 2013 17:19:40 -0700 Subject: [PATCH] numeric query tests --- test/test_query.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_query.py b/test/test_query.py index 996e341b4..0066b537b 100644 --- a/test/test_query.py +++ b/test/test_query.py @@ -305,6 +305,16 @@ class MemoryGetTest(unittest.TestCase, AssertsMixin): results = self.lib.items(q) self.assert_matched(results, [u'caf\xe9']) + def test_numeric_search_positive(self): + q = beets.library.NumericQuery('year', '1') + results = self.lib.items(q) + self.assertTrue(results) + + def test_numeric_search_negative(self): + q = beets.library.NumericQuery('year', '10') + results = self.lib.items(q) + self.assertFalse(results) + class MatchTest(unittest.TestCase): def setUp(self): self.item = _common.item()