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.

Code Duplication    Length = 23-32 lines in 2 locations

tests/test_folder_installer.py 2 locations

@@ 144-175 (lines=32) @@
141
142
            self.assertTrue(skin_path_exists)
143
144
145
class TestFolderInstallerFolderAlreadyExists(TestCase):
146
    """Standalone class for method testing folder_already_exists."""
147
148
    def test_existing(self):
149
        """
150
        Given
151
            installing a skin with name BeatTime from a folder
152
153
        Then
154
            checking after the installation if that skin already exists
155
156
        Should
157
            detect an already existing skin
158
        """
159
        tests_folder = os.path.dirname(os.path.abspath(__file__))
160
        folder_path = os.path.join(tests_folder, "skin_folder")
161
162
        # we need to make a temp copy first since we do not want to delete our original test data
163
        with tempfile.TemporaryDirectory() as temp_path:
164
            dst_path = os.path.join(temp_path, "skin_folder")
165
            shutil.copytree(folder_path, dst_path)
166
167
            actual_skin_path = FOLDER_INSTALLER.install_into_skins_folder(dst_path)
168
            self.assertTrue(len(actual_skin_path) > 0)
169
            self.assertTrue(os.path.isdir(actual_skin_path))
170
171
            skins_path = SKIN_PATH_PROVIDER.get_cached_skin_path()
172
            skin_path = os.path.join(skins_path, "BeatTime")
173
            skin_path_exists = FOLDER_INSTALLER.folder_already_exists(dst_path)
174
            self.assertEquals(actual_skin_path, skin_path)
175
176
            # cleanup the installed skin to make it reproduceable
177
            shutil.rmtree(skin_path)
178
@@ 120-142 (lines=23) @@
117
            self.assertTrue(skin_path_exists)
118
            self.assertTrue(resources_path_exists)
119
120
    def test_install_multi_skin(self):
121
        """Install multi skin configuration into Rainmeter skins folder."""
122
        tests_folder = os.path.dirname(os.path.abspath(__file__))
123
        folder_path = os.path.join(tests_folder, "multi_skin_folder")
124
125
        # we need to make a temp copy first since we do not want to delete our original test data
126
        with tempfile.TemporaryDirectory() as temp_path:
127
            dst_path = os.path.join(temp_path, "multi_skin_folder")
128
            shutil.copytree(folder_path, dst_path)
129
130
            actual_skin_path = FOLDER_INSTALLER.install_into_skins_folder(dst_path)
131
            self.assertTrue(os.path.isdir(actual_skin_path))
132
133
            skins_path = SKIN_PATH_PROVIDER.get_cached_skin_path()
134
            skin_path = os.path.join(skins_path, "Miniml")
135
            skin_path_exists = os.path.exists(skin_path)
136
137
            self.assertEquals(actual_skin_path, skin_path)
138
139
            # cleanup
140
            shutil.rmtree(skin_path)
141
142
            self.assertTrue(skin_path_exists)
143
144
145
class TestFolderInstallerFolderAlreadyExists(TestCase):