jenkins-bot submitted this change.
[bugfix] Minor flake8 warning
For the last month or so I've gotten the following warning whenever I run
tox...
./tests/category_tests.py: line 163:9: H214: Use assertIn/NotIn(A, B) rather
than assertTrue/False(A in/not in B) when checking collection contents.
Honestly I don't know why or why Gerrit's checks don't have it.
Bug: T287434
Change-Id: Ibf66b5b605334855637ca49ffb305a070df98cac
---
M tests/category_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/category_tests.py b/tests/category_tests.py
index 1dd3dfa..a39a684 100644
--- a/tests/category_tests.py
+++ b/tests/category_tests.py
@@ -160,7 +160,7 @@
# Invalid title case
cat3 = pywikibot.Category(site, '2021 establishments in Orissa')
cat4 = pywikibot.Category(site, '2021 establishments in Odisha')
- self.assertTrue('{{title year}}' in cat3.text)
+ self.assertIn('{{title year}}', cat3.text)
self.assertTrue(cat3.isCategoryRedirect())
self.assertFalse(cat4.isCategoryRedirect())
tgt = cat3.getCategoryRedirectTarget()
To view, visit change 708190. To unsubscribe, or for help writing mail filters, visit settings.