GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( e82bd7...2cdf78 )
by thatsIch
01:08
created

TestRefreshCommandArgs.test_config_overwrite()   A

Complexity

Conditions 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
1
"""This module is to test the refresh commands plugin."""
2
3
import sys
4
5
from unittest import TestCase
6
7
REFRESH_COMMANDS = sys.modules["Rainmeter.refreshcommands"]
8
9
10
class TestRefreshCommandArgs(TestCase):
11
    """Test class wrapper using unittest."""
12
13
    # pylint: disable=W0703; This is acceptable since we are testing it not failing
14
15
    def test_for_more_flags(self):
16
        """Calling from an inc file should result in less call flags."""
17
        shorter = REFRESH_COMMANDS.calculate_refresh_commands("Rainmeter.exe", "test-config", "file.inc", True, True)
18
        longer = REFRESH_COMMANDS.calculate_refresh_commands("Rainmeter.exe", "test-config", "file.ini", True, False)
19
20
        self.assertGreater(longer, shorter)
21
22
    def test_for_size(self):
23
        """Calling an inc file should matter only by one argument.
24
25
        It is missing the file name since we cannot directly refresh the inc file."""
26
27
        inc = REFRESH_COMMANDS.calculate_refresh_commands("Rainmeter.exe", "test-config", "file.inc", True, True)
28
        ini = REFRESH_COMMANDS.calculate_refresh_commands("Rainmeter.exe", "test-config", "file.ini", True, False)
29
30
        self.assertEqual(len(inc) + 1, len(ini))
31
32
    def test_config_overwrite(self):
33
        """If the config option is not activated we force it to do nothing thus resulting in the same result."""
34
        inc = REFRESH_COMMANDS.calculate_refresh_commands("Rainmeter.exe", "test-config", "file.inc", False, True)
35
        ini = REFRESH_COMMANDS.calculate_refresh_commands("Rainmeter.exe", "test-config", "file.ini", False, False)
36
37
        self.assertEquals(inc, ini)
38