Esempio n. 1
0
 def test_case_sensetive_filenames(self):
     imp = Resource(None, RESOURCE_PATH)
     first = self._res_cache.get_resource(imp.directory,
                                          imp.name.lower())
     second = self._res_cache.get_resource(imp.directory,
                                           imp.name.upper())
     assert_true(first is second)
Esempio n. 2
0
 def import_resource(self, name):
         self._import_resource(Resource(None, name))
Esempio n. 3
0
 def import_resource(self, name, overwrite=True):
     self._import_resource(Resource(None, name), overwrite=overwrite)
Esempio n. 4
0
 def test_file_with_invalid_path(self):
     imp = Resource(ParentMock(), '${kumikameli}')
     assert_none(self._res_cache.get_resource(imp.directory, imp.name))
Esempio n. 5
0
 def test_file_with_absolute_path(self):
     imp = Resource(ParentMock(), RESOURCE_PATH)
     assert_true(self._res_cache.get_resource(imp.directory, imp.name))
Esempio n. 6
0
 def test_file_read_only_once(self):
     imp = Resource(None, RESOURCE_PATH)
     first = self._res_cache.get_resource(imp.directory, imp.name)
     second = self._res_cache.get_resource(imp.directory, imp.name)
     assert_true(first is second)