update lint issues

This commit is contained in:
freddiewanah 2024-04-10 15:21:57 +02:00
parent 672a348852
commit 96c9a9531f
3 changed files with 34 additions and 13 deletions

View file

@ -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:

View file

@ -22,7 +22,6 @@ import socket
import sys
import tempfile
import threading
import time
import unittest
import asyncio
from contextlib import contextmanager

View file

@ -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):