summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfreddiewanah <freddie.wanah@gmail.com>2024-04-10 15:21:57 +0200
committerfreddiewanah <freddie.wanah@gmail.com>2024-04-10 15:21:57 +0200
commit96c9a9531f66ce5e37b4e2fe428ca51024290929 (patch)
tree24a4d7cdcdd15832c41e2fdd39a834d1dac6a7ae
parent672a348852647447a3907527821c6b992e45dbdd (diff)
update lint issues
-rw-r--r--test/plugins/test_bareasc.py35
-rw-r--r--test/plugins/test_player.py1
-rw-r--r--test/test_ui.py11
3 files changed, 34 insertions, 13 deletions
diff --git a/test/plugins/test_bareasc.py b/test/plugins/test_bareasc.py
index f098b4a3f..57f489f51 100644
--- a/test/plugins/test_bareasc.py
+++ b/test/plugins/test_bareasc.py
@@ -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:
diff --git a/test/plugins/test_player.py b/test/plugins/test_player.py
index bf9912142..175205132 100644
--- a/test/plugins/test_player.py
+++ b/test/plugins/test_player.py
@@ -22,7 +22,6 @@ import socket
import sys
import tempfile
import threading
-import time
import unittest
import asyncio
from contextlib import contextmanager
diff --git a/test/test_ui.py b/test/test_ui.py
index 915f47c69..8dd57dfce 100644
--- a/test/test_ui.py
+++ b/test/test_ui.py
@@ -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):