コード例 #1
0
ファイル: ConfigServiceTest.py プロジェクト: ethoeng/mantid
    def test_appending_paths(self):
        new_path_list = self._setup_test_areas()
        try:
            num_of_dirs = len(config.getDataSearchDirs())
            config.appendDataSearchDir(str(new_path_list[0]))
            updated_paths = config.getDataSearchDirs()
        finally:
            self._clean_up_test_areas()

        self.assertEqual(num_of_dirs + 1, len(updated_paths))
コード例 #2
0
 def do_test(paths):
     config.setDataSearchDirs(paths)
     newpaths = config.getDataSearchDirs()
     # Clean up here do that if the assert fails
     # it doesn't bring all the other tests down
     self._clean_up_test_areas()
     self.assertEqual(len(newpaths), 2)
     self.assertTrue('tmp' in newpaths[0])
     self.assertTrue('tmp_2' in newpaths[1])
コード例 #3
0
    def test_appending_paths(self):
        new_path_list = self._setup_test_areas()
        try:
            config.appendDataSearchDir(six.text_type(new_path_list[0]))
            updated_paths = config.getDataSearchDirs()
        finally:
            self._clean_up_test_areas()

        self.assertEqual(4, len(updated_paths))
コード例 #4
0
 def do_test(paths):
     config.setDataSearchDirs(paths)
     newpaths = config.getDataSearchDirs()
     # Clean up here do that if the assert fails
     # it doesn't bring all the other tests down
     self._clean_up_test_areas()
     self.assertEqual(len(newpaths), 2)
     self.assertTrue('tmp' in newpaths[0])
     self.assertTrue('tmp_2' in newpaths[1])
コード例 #5
0
    def test_appending_paths(self):
        new_path_list = self._setup_test_areas()
        try:
            config.appendDataSearchDir(six.text_type(new_path_list[0]))
            updated_paths = config.getDataSearchDirs()
        finally:
            self._clean_up_test_areas()

        self.assertEqual(4, len(updated_paths))
コード例 #6
0
    def test_setting_paths_via_single_string(self):
        new_path_list = self._setup_test_areas()
        path_str = ';'.join(new_path_list)
        config.setDataSearchDirs(path_str)
        paths = config.getDataSearchDirs()
        # Clean up here do that if the assert fails
        # it doesn't bring all the other tests down
        self._clean_up_test_areas()

        self.assertTrue(len(paths), 2)
        self.assertTrue('tmp' in paths[0])
        self.assertTrue('tmp_2' in paths[1])
        self._clean_up_test_areas()
コード例 #7
0
ファイル: ConfigServiceTest.py プロジェクト: dezed/mantid
    def test_setting_paths_via_single_string(self):
        new_path_list = self._setup_test_areas()
        path_str = ';'.join(new_path_list)
        config.setDataSearchDirs(path_str)
        paths = config.getDataSearchDirs()
        # Clean up here do that if the assert fails
        # it doesn't bring all the other tests down
        self._clean_up_test_areas()

        self.assertTrue(len(paths), 2)
        self.assertTrue('tmp' in paths[0])
        self.assertTrue('tmp_2' in paths[1])
        self._clean_up_test_areas()
コード例 #8
0
 def test_getting_search_paths(self):
     """Retrieve the search paths
     """
     paths = config.getDataSearchDirs()
     self.assertEquals(type(paths), std_vector_str)
     self.assert_(len(paths) > 0)
コード例 #9
0
ファイル: ConfigServiceTest.py プロジェクト: dezed/mantid
 def test_getting_search_paths(self):
     """Retrieve the search paths
     """
     paths = config.getDataSearchDirs()
     self.assertEquals(type(paths), std_vector_str)
     self.assert_(len(paths) > 0)