diff --git a/beets/test/_common.py b/beets/test/_common.py index 7fa843b63..757d461bd 100644 --- a/beets/test/_common.py +++ b/beets/test/_common.py @@ -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", diff --git a/beets/test/helper.py b/beets/test/helper.py index b919e1c2c..bba99dde6 100644 --- a/beets/test/helper.py +++ b/beets/test/helper.py @@ -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): diff --git a/setup.cfg b/setup.cfg index f69490630..8cf0dc3d0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,7 @@ markers = data_file = .reports/coverage/data branch = true relative_files = true +omit = beets/test/* [coverage:report] precision = 2