mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 22:42:44 +01:00
A couple of coverage tweaks
This commit is contained in:
parent
9531094f09
commit
434280f248
3 changed files with 5 additions and 3 deletions
|
|
@ -8,3 +8,4 @@ exclude_lines =
|
|||
assert False
|
||||
raise NotImplementedError
|
||||
if __name__ == .__main__.:
|
||||
def __repr__
|
||||
|
|
|
|||
|
|
@ -121,9 +121,6 @@ def str2fmt(s):
|
|||
"(?P<toyear>\d*)(?P<after>\D*)")
|
||||
m = re.match(regex, s)
|
||||
|
||||
def year_format(year):
|
||||
return '%%0%dd' % len(year)
|
||||
|
||||
res = {'fromnchars': len(m.group('fromyear')),
|
||||
'tonchars': len(m.group('toyear'))}
|
||||
res['fmt'] = "%s%%s%s%s%s" % (m.group('bef'),
|
||||
|
|
|
|||
|
|
@ -431,6 +431,10 @@ class QueryFromStringsTest(unittest.TestCase):
|
|||
q = self.qfs(['some_float_field:2..3'])
|
||||
self.assertIsInstance(q.subqueries[0], dbcore.query.NumericQuery)
|
||||
|
||||
def test_empty_query_part(self):
|
||||
q = self.qfs([''])
|
||||
self.assertIsInstance(q.subqueries[0], dbcore.query.TrueQuery)
|
||||
|
||||
|
||||
class SortFromStringsTest(unittest.TestCase):
|
||||
def sfs(self, strings):
|
||||
|
|
|
|||
Loading…
Reference in a new issue