mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Remove unused logic from beets.test and exclude it from coverage
Fun fact: it was the coverage data that revealed that this logic is not used.
This commit is contained in:
parent
41907a96a6
commit
6f41872a26
3 changed files with 2 additions and 13 deletions
|
|
@ -58,17 +58,12 @@ log = logging.getLogger("beets")
|
|||
log.propagate = True
|
||||
log.setLevel(logging.DEBUG)
|
||||
|
||||
# Dummy item creation.
|
||||
_item_ident = 0
|
||||
|
||||
# OS feature test.
|
||||
HAVE_SYMLINK = sys.platform != "win32"
|
||||
HAVE_HARDLINK = sys.platform != "win32"
|
||||
|
||||
|
||||
def item(lib=None):
|
||||
global _item_ident
|
||||
_item_ident += 1
|
||||
i = beets.library.Item(
|
||||
title="the title",
|
||||
artist="the artist",
|
||||
|
|
@ -93,7 +88,6 @@ def item(lib=None):
|
|||
comments="the comments",
|
||||
bpm=8,
|
||||
comp=True,
|
||||
path=f"somepath{_item_ident}",
|
||||
length=60.0,
|
||||
bitrate=128000,
|
||||
format="FLAC",
|
||||
|
|
|
|||
|
|
@ -713,10 +713,6 @@ class ImportSessionFixture(ImportSession):
|
|||
|
||||
default_resolution = "REMOVE"
|
||||
|
||||
def add_resolution(self, resolution):
|
||||
assert isinstance(resolution, self.Resolution)
|
||||
self._resolutions.append(resolution)
|
||||
|
||||
def resolve_duplicate(self, task, found_duplicates):
|
||||
try:
|
||||
res = self._resolutions.pop(0)
|
||||
|
|
@ -769,12 +765,10 @@ class TerminalImportSessionFixture(TerminalImportSession):
|
|||
self.io.addinput("T")
|
||||
elif choice == importer.action.SKIP:
|
||||
self.io.addinput("S")
|
||||
elif isinstance(choice, int):
|
||||
else:
|
||||
self.io.addinput("M")
|
||||
self.io.addinput(str(choice))
|
||||
self._add_choice_input()
|
||||
else:
|
||||
raise Exception("Unknown choice %s" % choice)
|
||||
|
||||
|
||||
class TerminalImportMixin(ImportHelper):
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ markers =
|
|||
data_file = .reports/coverage/data
|
||||
branch = true
|
||||
relative_files = true
|
||||
omit = beets/test/*
|
||||
|
||||
[coverage:report]
|
||||
precision = 2
|
||||
|
|
|
|||
Loading…
Reference in a new issue