示例#1
0
    def test_find_config_file_object_one(self):
        error_message = "The file '{0}' should have been loaded by the "\
                        "dodai.util.find.ConfigFile object."

        obj = find.ConfigFiles(find.config_directories(self._fixture.PROJECT),
                               find.system_encoding())
        files = obj(self._fixture.custom_filenames)
        for name in files:
            msg = error_message.format(name)
            self.assertTrue(name.name in self._fixture.good_filenames, msg=msg)
示例#2
0
    def test_find_config_file_object_three(self):
        error_message = "The file '{0}' should NOT have been loaded by the "\
                        "dodai.util.find.ConfigFile object"

        obj = find.ConfigFiles(find.config_directories(self._fixture.PROJECT),
                               find.system_encoding())
        files = obj(self._fixture.custom_filenames)

        loaded_files = []
        for name in files:
            loaded_files.append(name.name)

        for name in self._fixture.bogus_filenames:
            msg = error_message.format(name)
            self.assertFalse(name in loaded_files, msg=msg)
示例#3
0
 def test_find_config_directories(self):
     directories = find.config_directories(self.project)
     self.assertEqual(len(directories), 3)
示例#4
0
文件: test_find.py 项目: otmsol/dodai
def test_find_config_directories():
    """Test to make sure that three config directories are returned.
    """
    dirs = find.config_directories('test')
    nt.eq_(len(dirs), 3)