Example #1
0
 def setUp(self):
     PluginRegister.clean_up_registered_plugins()
     ProjectSettings.clear()
     ThemeSettings.clear()
     ShareData.clear()
     #force reload
     for key in ['test_theme1', 'test_theme1.plugin',
                 'test_theme2', 'test_theme2.plugin']:
         if key in sys.modules:
             del sys.modules[key]
Example #2
0
    def setUp(self):
        ShareData.clear()
        ProjectSettings.clear()
        ThemeSettings.clear()
        PluginRegister.clean_up_registered_plugins()

        self.project_path = os.path.join(
            os.getcwd(),
            'tests/cases/project',
        )
Example #3
0
    def test_theme_names_retrieving(self):
        ProjectSettings.clear()
        case_path = self._get_file_path('case2')
        loader = SettingsLoader(case_path)

        ProjectSettings.load_data(loader)

        self.assertListEqual(
            list(ProjectSettings.get_registered_theme_name()),
            ['a', 'b', 'c', 'd', 'e', 'f'],
        )
Example #4
0
    def test_settings_run(self):
        SettingsProcedure.run(self.project_path)

        self.assertSetEqual(
            set(ProjectSettings.get_registered_theme_name()),
            set(['test_theme1', 'test_theme2']),
        )
        self.assertSetEqual(
            set(ThemeSettings._vars),
            set(['test_theme1', 'test_theme2']),
        )