mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-12-01 07:34:16 +01:00
5393dc1929
None of these were any real problems, but easier to spot real issues if pylint is a bit quieter. Apart from the pylint overrides being sprinkled over the code base, this commit also fixes occurences of the following issues: - logging-not-lazy - logging-format-interpolation - unused-import - unused-variable
26 lines
706 B
Python
26 lines
706 B
Python
#!/usr/bin/python
|
|
# ex:ts=4:sw=4:sts=4:et
|
|
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
# The unittest framwork doesn't play nice with pylint:
|
|
# pylint: disable-msg=C0103
|
|
|
|
import unittest
|
|
|
|
|
|
class HandlesURLsTestMixin():
|
|
"""
|
|
This should only be inherited from classes which also inherit
|
|
a unittest compatible base class.
|
|
"""
|
|
# pylint: disable-msg=no-init
|
|
|
|
def test_handles_urls(self):
|
|
if len(self.urls['ok']) > 0:
|
|
for url in self.urls['ok']:
|
|
self.assertTrue(self.service.handles(url))
|
|
|
|
if len(self.urls['bad']) > 0:
|
|
for url in self.urls['bad']:
|
|
self.assertFalse(self.service.handles(url))
|