mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 01:25:47 +01:00
added test for bucket plugin
This commit is contained in:
parent
35497ff696
commit
21f1f53fea
1 changed files with 11 additions and 0 deletions
|
|
@ -150,6 +150,17 @@ class BucketPluginTest(unittest.TestCase, TestHelper):
|
|||
with self.assertRaises(ui.UserError):
|
||||
self._setup_config(bucket_year=['nodigits'])
|
||||
|
||||
def check_span_from_str(self, sstr, dfrom, dto):
|
||||
d = bucket.span_from_str(sstr)
|
||||
self.assertEqual(dfrom, d['from'])
|
||||
self.assertEqual(dto, d['to'])
|
||||
|
||||
def test_span_from_str(self):
|
||||
self.check_span_from_str("1980 2000", 1980, 2000)
|
||||
self.check_span_from_str("1980 00", 1980, 2000)
|
||||
self.check_span_from_str("1930 00", 1930, 2000)
|
||||
self.check_span_from_str("1930 50", 1930, 1950)
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
|
|
|||
Loading…
Reference in a new issue