Test Failed
Push — master ( 8192fe...83ef1f )
by Steffen
02:25
created

tests.custom.test_saucenao_limit   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 172
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 16
eloc 86
dl 0
loc 172
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A TestSauceNaoLimits.check_response_no_api_key() 0 13 2
A TestSauceNaoLimits.tearDown() 0 6 1
A TestSauceNaoLimits.setUp() 0 21 1
A TestSauceNaoLimits.check_response_api_key() 0 14 2
A TestSauceNaoLimits.run_tests() 0 14 3
B TestSauceNaoLimits.test_limits() 0 43 6

1 Function

Rating   Name   Duplication   Size   Complexity  
A generate_small_jpg() 0 9 1
1
#!/usr/bin/python
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
# -*- coding: utf-8 -*-
3
import logging
4
import os
5
import unittest
6
import uuid
7
8
import dotenv
0 ignored issues
show
introduced by
Unable to import 'dotenv'
Loading history...
9
from PIL import Image
0 ignored issues
show
introduced by
Unable to import 'PIL'
Loading history...
10
11
from saucenao.saucenao import DailyLimitReachedException
12
from saucenao.saucenao import SauceNao
13
14
dotenv_path = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, '.env')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (83/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style Naming introduced by
The name dotenv_path does not conform to the constant naming conventions ((([A-Z_][A-Z0-9_]*)|(__.*__))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
15
dotenv.load_dotenv(dotenv_path)
16
17
SAUCENAO_MIN_WIDTH = 3
18
SAUCENAO_MIN_HEIGHT = 3
19
20
SAUCENAO_IP_LIMIT_UNREGISTERED_USER = 150
21
SAUCENAO_IP_LIMIT_BASIC_USER = 300
22
23
SAUCENAO_API_KEY = os.environ.get('SAUCENAO_API_KEY')
24
25
26
def generate_small_jpg():
27
    """Generate a rather small jpg file to upload faster(631 bytes)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
28
29
    :return:
30
    """
31
    file_path = str(uuid.uuid4()) + ".jpg"
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
32
    im = Image.new("RGB", (SAUCENAO_MIN_WIDTH, SAUCENAO_MIN_HEIGHT))
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Naming introduced by
The name im does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
33
    im.save(os.path.join(os.getcwd(), file_path), "JPEG")
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
34
    return file_path
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
35
36
37
class TestSauceNaoLimits(unittest.TestCase):
0 ignored issues
show
Unused Code introduced by
The variable __class__ seems to be unused.
Loading history...
38
    """
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
39
    test cases to check the limits for SauceNAO
40
41
    currently not covered is the test case: account limit reached, ip limit not reached
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (87/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
42
    have to add a proxy for this test case to be covered.
43
44
    Test cases covered:
45
     - HTML response type: ip/account limit not reached
46
     - JSON response type: ip/account limit not reached
47
     - HTML response type: ip limit reached
48
     - JSON response type: ip limit reached
49
    """
50
51
    def setUp(self):
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
52
        """Constructor for the unittest
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
53
54
        :return:
55
        """
56
        self.test_jpg = generate_small_jpg()
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
57
58
        self.saucenao_html = SauceNao(os.getcwd(), output_type=SauceNao.API_HTML_TYPE, log_level=logging.DEBUG)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (111/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
59
        self.saucenao_json = SauceNao(os.getcwd(), output_type=SauceNao.API_JSON_TYPE, log_level=logging.DEBUG)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (111/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
60
61
        self.NOT_IP_LIMIT_NOT_ACCOUNT_LIMIT = [
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Naming introduced by
The name NOT_IP_LIMIT_NOT_ACCOUNT_LIMIT does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
62
            {'function': self.check_response_no_api_key, 'expected_success': True},
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (83/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
63
            {'function': self.check_response_api_key, 'expected_success': True}
64
        ]
65
        self.IP_LIMIT_NOT_ACCOUNT_LIMIT = [
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Naming introduced by
The name IP_LIMIT_NOT_ACCOUNT_LIMIT does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
66
            {'function': self.check_response_no_api_key, 'expected_success': False},
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (84/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
67
            {'function': self.check_response_api_key, 'expected_success': True}
68
        ]
69
        self.IP_LIMIT_ACCOUNT_LIMIT = [
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Naming introduced by
The name IP_LIMIT_ACCOUNT_LIMIT does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
70
            {'function': self.check_response_no_api_key, 'expected_success': False},
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (84/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
71
            {'function': self.check_response_api_key, 'expected_success': False}
72
        ]
73
74
    def tearDown(self):
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
75
        """Destructor for the unittest
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
76
77
        :return:
78
        """
79
        os.remove(self.test_jpg)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
80
81
    def run_tests(self, saucenao: SauceNao, tests):
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
82
        """Run the different tests with the given SauceNao instance
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
83
84
        :type saucenao: SauceNao
85
        :type tests: list|tuple|Generator
86
        :return:
87
        """
88
        for test in tests:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
89
            test_function = test['function']
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
90
            test_result = test['expected_success']
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
91
            try:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
92
                test_function(saucenao, assert_success=test_result)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
93
            except Exception as e:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Best Practice introduced by
Catching very general exceptions such as Exception is usually not recommended.

Generally, you would want to handle very specific errors in the exception handler. This ensure that you do not hide other types of errors which should be fixed.

So, unless you specifically plan to handle any error, consider adding a more specific exception.

Loading history...
Coding Style Naming introduced by
The name e does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
94
                self.fail("{} failed ({}: {})".format(test, type(e), e))
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
95
96
    def test_limits(self):
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
97
        """Test the limits of SauceNAO
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
98
99
        :return:
100
        """
101
        self.saucenao_html.logger.info('running HTML test, ip limit not reached, account limit not reached')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (108/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
102
        self.run_tests(saucenao=self.saucenao_html, tests=self.NOT_IP_LIMIT_NOT_ACCOUNT_LIMIT)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (94/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
103
        self.saucenao_html.logger.info('running JSON test, ip limit not reached, account limit not reached')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (108/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
104
        self.run_tests(saucenao=self.saucenao_json, tests=self.NOT_IP_LIMIT_NOT_ACCOUNT_LIMIT)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (94/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
105
106
        # now reach the daily limit without API key to reach the IP limit
107
        if self.saucenao_html._api_key:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Best Practice introduced by
It seems like _api_key was declared protected and should not be accessed from this context.

Prefixing a member variable _ is usually regarded as the equivalent of declaring it with protected visibility that exists in other languages. Consequentially, such a member should only be accessed from the same class or a child class:

class MyParent:
    def __init__(self):
        self._x = 1;
        self.y = 2;

class MyChild(MyParent):
    def some_method(self):
        return self._x    # Ok, since accessed from a child class

class AnotherClass:
    def some_method(self, instance_of_my_child):
        return instance_of_my_child._x   # Would be flagged as AnotherClass is not
                                         # a child class of MyParent
Loading history...
108
            self.saucenao_html._api_key = None
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Best Practice introduced by
It seems like _api_key was declared protected and should not be accessed from this context.

Prefixing a member variable _ is usually regarded as the equivalent of declaring it with protected visibility that exists in other languages. Consequentially, such a member should only be accessed from the same class or a child class:

class MyParent:
    def __init__(self):
        self._x = 1;
        self.y = 2;

class MyChild(MyParent):
    def some_method(self):
        return self._x    # Ok, since accessed from a child class

class AnotherClass:
    def some_method(self, instance_of_my_child):
        return instance_of_my_child._x   # Would be flagged as AnotherClass is not
                                         # a child class of MyParent
Loading history...
109
110
        test_files = [self.test_jpg] * (SAUCENAO_IP_LIMIT_UNREGISTERED_USER - 2)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
111
        try:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
112
            # check_files returns a generator so we have to improvise here a bit
113
            for _ in self.saucenao_html.check_files(test_files):
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Bug introduced by
Instance of 'SauceNao' has no 'check_files' member; maybe 'check_file'?

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
114
                pass
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
115
        except DailyLimitReachedException:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
116
            pass
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
117
118
        # we are at 150 searches -> IP limit unregistered user reached, not basic user
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (86/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
119
        self.saucenao_html.logger.info('running HTML test, ip limit reached, account limit not reached')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (104/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
120
        self.run_tests(saucenao=self.saucenao_html, tests=self.IP_LIMIT_NOT_ACCOUNT_LIMIT)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (90/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
121
        self.saucenao_html.logger.info('running JSON test, ip limit reached, account limit not reached')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (104/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
122
        self.run_tests(saucenao=self.saucenao_json, tests=self.IP_LIMIT_NOT_ACCOUNT_LIMIT)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (90/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
123
124
        # set API key to reach the account limit
125
        self.saucenao_html._api_key = SAUCENAO_API_KEY
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Best Practice introduced by
It seems like _api_key was declared protected and should not be accessed from this context.

Prefixing a member variable _ is usually regarded as the equivalent of declaring it with protected visibility that exists in other languages. Consequentially, such a member should only be accessed from the same class or a child class:

class MyParent:
    def __init__(self):
        self._x = 1;
        self.y = 2;

class MyChild(MyParent):
    def some_method(self):
        return self._x    # Ok, since accessed from a child class

class AnotherClass:
    def some_method(self, instance_of_my_child):
        return instance_of_my_child._x   # Would be flagged as AnotherClass is not
                                         # a child class of MyParent
Loading history...
126
        test_files = [self.test_jpg] * (SAUCENAO_IP_LIMIT_BASIC_USER - SAUCENAO_IP_LIMIT_UNREGISTERED_USER - 4)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (111/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
127
        try:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
128
            # check_files returns a generator so we have to improvise here a bit
129
            for _ in self.saucenao_html.check_files(test_files):
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Bug introduced by
Instance of 'SauceNao' has no 'check_files' member; maybe 'check_file'?

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
130
                pass
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
131
        except DailyLimitReachedException:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
132
            pass
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
133
134
        # we are at 30 searches -> IP limit basic user reached
135
        self.saucenao_html.logger.info('running HTML test, ip limit reached, account limit reached')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (100/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
136
        self.run_tests(saucenao=self.saucenao_html, tests=self.IP_LIMIT_ACCOUNT_LIMIT)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (86/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
137
        self.saucenao_html.logger.info('running JSON test, ip limit reached, account limit reached')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (100/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
138
        self.run_tests(saucenao=self.saucenao_json, tests=self.IP_LIMIT_ACCOUNT_LIMIT)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (86/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
139
140
    def check_response_no_api_key(self, saucenao: SauceNao, assert_success=True):
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (81/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
141
        """Check the response without an API key
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
142
        on assert_success=True expect a dictionary, else an exception
143
144
        :type saucenao: SauceNao
145
        :type assert_success: bool
146
        :return:
147
        """
148
        if assert_success:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
149
            result = saucenao.check_file(self.test_jpg)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
150
            self.assertIsInstance(result, list)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
151
        else:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
152
            self.assertRaises(DailyLimitReachedException, saucenao.check_file, self.test_jpg)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (93/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
153
154
    def check_response_api_key(self, saucenao: SauceNao, assert_success=True):
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
155
        """Check the response with an API key
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
156
        on assert_success=True expect a dictionary, else an exception
157
158
        :type saucenao: SauceNao
159
        :type assert_success: bool
160
        :return:
161
        """
162
        saucenao._api_key = SAUCENAO_API_KEY
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
Coding Style Best Practice introduced by
It seems like _api_key was declared protected and should not be accessed from this context.

Prefixing a member variable _ is usually regarded as the equivalent of declaring it with protected visibility that exists in other languages. Consequentially, such a member should only be accessed from the same class or a child class:

class MyParent:
    def __init__(self):
        self._x = 1;
        self.y = 2;

class MyChild(MyParent):
    def some_method(self):
        return self._x    # Ok, since accessed from a child class

class AnotherClass:
    def some_method(self, instance_of_my_child):
        return instance_of_my_child._x   # Would be flagged as AnotherClass is not
                                         # a child class of MyParent
Loading history...
163
        if assert_success:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
164
            result = saucenao.check_file(self.test_jpg)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
165
            self.assertIsInstance(result, list)
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
166
        else:
0 ignored issues
show
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
167
            self.assertRaises(DailyLimitReachedException, saucenao.check_file, self.test_jpg)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (93/80).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Found indentation with spaces instead of tabs
Loading history...
168
169
170
suite = unittest.TestLoader().loadTestsFromTestCase(TestSauceNaoLimits)
0 ignored issues
show
Coding Style Naming introduced by
The name suite does not conform to the constant naming conventions ((([A-Z_][A-Z0-9_]*)|(__.*__))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
171
unittest.TextTestRunner(verbosity=2).run(suite)
172