mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 21:12:43 +01:00
Add error message and test for invalid years.
This commit is contained in:
parent
fe41bba380
commit
c102b3be90
1 changed files with 4 additions and 1 deletions
|
|
@ -75,7 +75,6 @@ class QueryParseTest(unittest.TestCase):
|
|||
r = ('year', '1999-2001', beets.library.YearQuery)
|
||||
self.assertEqual(pqp(q), r)
|
||||
|
||||
|
||||
class AnyFieldQueryTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.lib = beets.library.Library(':memory:')
|
||||
|
|
@ -258,6 +257,10 @@ class GetTest(unittest.TestCase, AssertsMixin):
|
|||
self.assert_matched(results, 'Boracay')
|
||||
self.assert_done(results)
|
||||
|
||||
def test_bad_year(self):
|
||||
q = 'year:delete from items'
|
||||
self.assertRaises(ValueError, self.lib.items, q)
|
||||
|
||||
class MemoryGetTest(unittest.TestCase, AssertsMixin):
|
||||
def setUp(self):
|
||||
self.album_item = _common.item()
|
||||
|
|
|
|||
Loading…
Reference in a new issue