mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
update lint issues
This commit is contained in:
parent
672a348852
commit
96c9a9531f
3 changed files with 34 additions and 13 deletions
|
|
@ -29,13 +29,34 @@ class BareascPluginTest(unittest.TestCase, TestHelper):
|
|||
|
||||
def test_bareasc_search(self):
|
||||
test_cases = [
|
||||
("dvorak", ["without accents"]), # Normal search, no accents, not using bare-ASCII match.
|
||||
("dvořák", ["with accents"]), # Normal search, with accents, not using bare-ASCII match.
|
||||
("#dvorak", ["without accents", "with accents"]), # Bare-ASCII search, no accents.
|
||||
("#dvořák", ["without accents", "with accents"]), # Bare-ASCII search, with accents.
|
||||
("#dvořäk", ["without accents", "with accents"]), # Bare-ASCII search, with incorrect accent.
|
||||
("#Bruggen", ["without umlaut or e", "with umlaut"]), # Bare-ASCII search, with no umlaut.
|
||||
("#Brüggen", ["without umlaut or e", "with umlaut"]), # Bare-ASCII search, with umlaut.
|
||||
(
|
||||
"dvorak",
|
||||
["without accents"],
|
||||
), # Normal search, no accents, not using bare-ASCII match.
|
||||
(
|
||||
"dvořák",
|
||||
["with accents"],
|
||||
), # Normal search, with accents, not using bare-ASCII match.
|
||||
(
|
||||
"#dvorak",
|
||||
["without accents", "with accents"],
|
||||
), # Bare-ASCII search, no accents.
|
||||
(
|
||||
"#dvořák",
|
||||
["without accents", "with accents"],
|
||||
), # Bare-ASCII search, with accents.
|
||||
(
|
||||
"#dvořäk",
|
||||
["without accents", "with accents"],
|
||||
), # Bare-ASCII search, with incorrect accent.
|
||||
(
|
||||
"#Bruggen",
|
||||
["without umlaut or e", "with umlaut"],
|
||||
), # Bare-ASCII search, with no umlaut.
|
||||
(
|
||||
"#Brüggen",
|
||||
["without umlaut or e", "with umlaut"],
|
||||
), # Bare-ASCII search, with umlaut.
|
||||
]
|
||||
|
||||
for query, expected_titles in test_cases:
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import socket
|
|||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
import asyncio
|
||||
from contextlib import contextmanager
|
||||
|
|
|
|||
|
|
@ -1344,9 +1344,7 @@ class ShowChangeTest(_common.TestCase):
|
|||
long_title = "a track with a" + (" very" * 10) + " long name"
|
||||
self.items[0].title = long_title
|
||||
msg = self._show_change()
|
||||
self.assertIn(
|
||||
"(#1) a track (1:00) -> (#1) the title (0:00)", msg
|
||||
)
|
||||
self.assertIn("(#1) a track (1:00) -> (#1) the title (0:00)", msg)
|
||||
|
||||
def test_item_data_change_wrap_newline(self):
|
||||
# Patch ui.term_width to force wrapping
|
||||
|
|
@ -1463,8 +1461,11 @@ class CompletionTest(_common.TestCase, TestHelper):
|
|||
with open(test_script_name, "rb") as test_script_file:
|
||||
tester.stdin.writelines(test_script_file)
|
||||
out, err = tester.communicate()
|
||||
self.assertTrue(tester.returncode != 0 or out != b"completion tests passed\n", f'test/test_completion.sh did not execute properly. Output:{out.decode("utf-8")}')
|
||||
|
||||
self.assertTrue(
|
||||
tester.returncode != 0 or out != b"completion tests passed\n",
|
||||
f'test/test_completion.sh did not execute properly. '
|
||||
f'Output:{out.decode("utf-8")}',
|
||||
)
|
||||
|
||||
|
||||
class CommonOptionsParserCliTest(unittest.TestCase, TestHelper):
|
||||
|
|
|
|||
Loading…
Reference in a new issue